To Create a JMS Connection Factory Resource

When you create a JMS connection factory, the GlassFish Server creates a connector connection pool and a connector resource for the connection factory. You can view these objects under the Connectors node.

  1. In the navigation tree, expand the Resources node.

  2. Under the Resources node, expand the JMS Resources node.

  3. Under the JMS Resources node, select the JMS Connection Factories node.

    The JMS Connection Factories page opens.

  4. On the JMS Connection Factories page, click New.

    The New JMS Connection Factory page appears.

  5. In the Pool Name field, type the unique name of the connection factory.

    GlassFish Server sets the JNDI name of the connection factory to this value..

  6. From the Resource Type drop-down list, select either javax.jms.ConnectionFactory, javax.jms.QueueConnectionFactory, or javax.jms.TopicConnectionFactory.

  7. In the Description field, type a description of the connection factory.

  8. Select the Status Enabled checkbox to enable the resource at run time.

    This option is enabled by default.

  9. In the Initial and Minimum Pool Size field, specify the minimum number of connections in the pool.

    The default value is 8.

  10. In the Maximum Pool Size field, specify the maximum number of connections in the pool.

    The default value is 32.

  11. In the Pool Resize Quantity field, specify the number of connections to be removed when pool idle timeout expires.

    The default value is 2.

  12. In the Idle Timeout field, specify the maximum time in seconds that a connection can remain idle in the pool.

    The default value is 300.

  13. In the Max Wait Time field, specify the amount of time the application requesting a connection will wait before getting a connection timeout.

    The default value is 60000.

  14. Select the On Any Failure Close All Connections checkbox so the GlassFish Server will close all connections in the pool and reestablish them if a single connection fails.

    If you do not select the checkbox, individual connections will be reestablished only when they are used. This option is disabled by default.

  15. For a JMS connection factory resource, select the level of Transaction Support.

    The selected value overwrites the transaction support attribute in the Resource Adapter in a downward compatible way.

  16. Select the Connection Validation Required checkbox to enable connection validation.

    If this option is selected, connections are validated before being given to the application. If a resource's validation fails, it is destroyed, and a new resource is created and returned. This option is disabled by default.

  17. In the Additional Properties section, specify additional properties for the connection factory.

    For information on available properties, see Properties Specific to JMS Connection Factories.

    To add a property, click the Add Property button. In the blank row that appears, type the property name in the Name field, and type the property value in the Value field.

  18. In the Targets area, do the following:

    1. From the Available column, select the target or targets to which applications that use the resource will be deployed.

      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.

  19. Click OK.

See Also
Copyright © 2005, 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices