Creating a JMS Connection Factory Resource

To create a JMS connection factory resource, follow these steps:

  1. In the tree component, expand the Resources node, then expand the JMS Resources node.
  2. Select the Connection Factories node.
  3. On the JMS Connection Factories page, click New. The Create JMS Connection Factory page appears.
  4. In the JNDI Name field, type the name of the connection factory. For example:
  5. jms/ConnectionFactory1

    It is a recommended practice to use the naming subcontext prefix jms/ for JMS resources.

  6. From the Type drop-down list, choose either javax.jms.ConnectionFactory, javax.jms.QueueConnectionFactory, or javax.jms.TopicConnectionFactory.
  7. Select the Enabled checkbox to enable the resource at run time.
  8. In the Advanced area, change values as needed for the connection factory attributes. For details about these attributes, see the table entitled “Pool Settings for a Connector Connection Pool” in "Editing a Connector Connection Pool". The Application Server applies these attributes to the connector connection pool created for the connection factory.
  9. For a JMS connection factory resource, specify the Transaction Support value as follows:

  10. In the Additional Properties area, provide values for properties required by your application. The following table lists the available properties.

    Table 0-25  Additional Properties for JMS Connection Factories 

    Property Name

    Description

    ClientId

    Specifies a client ID for a connection factory that will be used by a durable subscriber.

    AddressList

    Specifies the names (and, optionally, port numbers) of a message broker instance or instances with which your application will communicate. Each address in the list specifies the host name (and, optionally, host port and connection service) for the connection. For example, the value might be earth or earth:7677. Specify the port number if the message broker is running on a port other than the default (7676). If you specify multiple hosts and ports in a clustered environment, the first available host on the list is used unless the AddressListBehavior property is set to RANDOM.

    For details, see the Sun Java System Message Queue 3 2004Q4 Developer’s Guide for Java Clients.

    Default: The local host and default port number (7676). The client will attempt a connection to a broker on port 7676 of the local host.

    MessageServiceAddressList

    Same as AddressList. This property name is deprecated. Use AddressList instead.

    UserName

    The user name for the connection factory.

    Default: guest

    Password

    The password for the connection factory.

    Default: guest

    ReconnectEnabled

    If enabled (value = true), specifies that the client runtime attempts to reconnect to a message server (or the list of addresses in the AddressList) when a connection is lost.

    Default: false

    ReconnectAttempts

    Specifies the number of attempts to connect (or reconnect) for each address in the AddressList before the client runtime tries the next address in the list. A value of -1 indicates that the number of reconnect attempts is unlimited (the client runtime attempts to connect to the first address until it succeeds).

    Default: 6

    ReconnectInterval

    Specifies the interval in milliseconds between reconnect attempts. This applies for attempts on each address in the AddressList and for successive addresses in the list. If the interval is too short, the broker does not have time to recover. If it is too long, the reconnect might represent an unacceptable delay.

    Default: 30000

    AddressListBehavior

    Specifies whether connection attempts are in the order of addresses in the AddressList attribute (PRIORITY) or in a random order (RANDOM).

    PRIORITY means that the reconnect always tries to connect to the first server address in the AddressList and uses another address only if the first broker is not available.

    If many clients are likely to attempt a connection using the same connection factory, specify RANDOM to prevent them from all being connected to the same address.

    Default: PRIORITY

    AddressListIterations

    Specifies the number of times the client runtime iterates through the AddressList in an effort to establish (or re-establish) a connection). A value of -1 indicates that the number of attempts is unlimited.

    Default: -1

  11. In the Targets area, do the following:
    1. From the Available column, select the target or targets where you plan to deploy applications that use the resource. The available targets include the available clusters and server instances as well as the default server instance, server.
    2. Click Add to move the target to the Selected column.
  12. Click OK to save the connection factory.

Equivalent asadmin command: create-jms-resource

See Also:


Legal Notices