All Downloads are FREE. Search and download functionalities are using the official Maven repository.

en.help.task-jmsconnectionnew.html Maven / Gradle / Ivy

There is a newer version: 3.2-b03
Show newest version



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.

    • Select XATransaction (the default value for the JMS Resource Adapter) for a resource that can be used for transactions that involve the use of more than one resource within a transaction scope.

      For example, transactions may involve this resource plus a JDBC resource, a connector resource, or another JMS connection factory resource. This value offers the most flexibility. A resource that is configured as XATransaction will participate in two-phase commit operations.

    • Select LocalTransaction for a resource that can be used either for transactions that involve only one resource within the transaction scope or as the last agent in a distributed transaction that involves more than one XA resource.

      This value offers significantly better performance. A resource that is configured as LocalTransaction will not be used in two-phase commit operations.

    • Select NoTransaction for a resource that can never participate in transactions.

      This setting is of limited use in JMS applications.

  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. (Optional) 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. Click OK.
See Also
Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices




© 2015 - 2024 Weber Informatics LLC | Privacy Policy