Creating Connection Factories

About this task

You can create the following types of connection factories in the JNDI namespace of a realm in the Enterprise Manager:

  • Connection factory - connects to both topics and queues
  • Topic connection factory - connects to topics
  • Queue connection factory - connects to queues
  • XA connection factory

To create any type of connection factory in the Enterprise Manager

Procedure

  1. Select a realm and go to the JNDI tab.
  2. Right-click the relevant connection factory node, and then select the context menu to create a new connection factory.
  3. In the Add JNDI Connection Factory dialog box, specify values for the following fields:
    Field Description
    Name Required. The name of the new connection factory, for example connectionFactory1.
    Connection URL (RNAME) Required. The Universal Messaging realm URL for binding the connection factory, for example nsp://localhost:9000. You can specify a cluster of realms by typing a comma-separated list of connection URLs, for example nsp://localhost:9000,nsp://localhost:9010.

    To use a horizontal scalability connection factory for round-robin message delivery, you can specify several connection URLs, where each connection URL can point to a standalone realm or a cluster. For information about the URL syntax, see The URL Syntax of a Horizontal Scalability Connection Factory.

    Note: Round-robin delivery is not supported for XA connection factories.
    Durable Type Supported only for the connection factory and topic connection factory types. The durable type for durable consumers. Values are:
    • Named - Only one active consumer can exist at a time.
    • Shared - Multiple durable consumers can connect to the same durable subscription and can consume messages in a round-robin manner.
    • Serial - Multiple durable consumers can connect to the same durable subscription and can consume messages in a serial manner.
  4. Click OK.

The URL Syntax of a Horizontal Scalability Connection Factory

Horizontal scalability connection factories enable clients to publish messages to a set of servers or consume messages from a set of servers in a round-robin manner. The following rules apply to the round-robin URL syntax:

  • Each connection URL must be enclosed in round brackets.
  • Each set of brackets must contain at least one valid connection URL.
  • There is no limit to the number of sets of brackets in the URL.
  • Each set of brackets indicates a unique connection, and the realm names in each set of brackets are supplied unchanged to the underlying implementation.

Consider the following examples:

  • (UM1)(UM2)(UM3)(UM4) - Indicates four standalone realms, UM1, UM2, UM3, and UM4, so four connections will be constructed here.

  • (UM1,UM2)(UM3,UM4) - Indicates two clusters, one consisting of UM1 and UM2, and the other consisting of UM3 and UM4, so only two connections will be constructed here.

  • (UM1)(UM2,UM3)(UM4) - Indicates one cluster consisting of UM2 and UM3, and two standalone realms: UM1 and UM4. A total of three connections will be constructed here.
Note: Round-robin delivery is not supported for XA connection factories.

For more information about horizontal scalability connection factories, see Overview of the Provider for JMS in the Developer Guide.