Connection factories are used by client applications to create connections to a broker. By configuring a connection factory, you can control the properties of the connections it creates.
Make sure the object store is connected to the Administration Console (see Connecting to an Object Store).
Click on the Connection Factories item under the object store’s name in the Administration Console window’s navigation pane and choose Add Connection Factory Object from the Actions menu.
Alternatively, you can right-click on Connection Factories and choose Add Connection Factory Object from the pop-up context menu. In either case, the Add Connection Factory Object dialog box ( Figure 2–13) will appear.
Enter a name for the connection factory in the Lookup Name field.
This is the name that client applications will use when looking up the connection factory with JNDI.
For this exercise, type in the name MyQueueConnectionFactory .
Choose the type of connection factory you wish to create from the Factory Type pull-down menu.
For this exercise, choose QueueConnectionFactory.
Click the Connection Handling tab.
The Connection Handling panel will appear, as shown in Figure 2–13.
Fill in the Message Server Address List field with the address(es) of the broker(s) to which this connection factory will create connections.
The address list may consist of a single broker or (in the case of a broker cluster) multiple brokers. For each broker, it specifies information such as the broker’s connection service, host name, and port number. The exact nature and syntax of the information to be specified varies, depending on the connection service to be used; see Connection Handling for specifics.
For this exercise, there is no need to type anything into the Message Server Address List field, since the sample application HelloWorldMessageJNDI expects the connection factory to use the standard address list attributes to which it is automatically configured by default (connection service jms , host name localhost, and port number 7676 ).
Configure any other attributes of the connection factory as needed.
The Add Connection Factory Object dialog box contains a number of other panels besides Connection Handling, which can be used to configure various attributes for a connection factory.
For this exercise, do not change any of the other attribute settings. You may find it instructive, however, to click through the other tabs to get an idea of the kinds of configuration information that can be specified. Use the Help button to learn more about the contents of these other configuration panels.
If appropriate, click the Read-Only checkbox.
This locks the connection factory object’s configuration attributes to the values they were given at creation time. A read-only administered object’s attributes cannot be overridden, whether programmatically from client code or administratively from the command line.
For this exercise, do not check Read-Only.
Click OK to create the connection factory, add it to the object store, and dismiss the dialog box.
The new connection factory will appear in the result pane.