JMS 1.1 Release Connection and Session Service

The JMS 1.1 Release Connection and Session service returns a JMS connection and session back to the pool.

The following table provides an overview of the JMS 1.1 Release Connection and Session service:

System Name JMS 1.1 Release Connection and Session service
Graphical Process Modeler (GPM) categories) All Services
Description The JMS 1.1 Release Connection and Session service returns a JMS connection and session back to the pool.
Business usage The service can be used in a normal JMS 1.1 business process with the mode set as NONE. In this scenario, the JMS 1.1 Release Connection and Session service is used to release connections and sessions used to pool. The service can also be used individually to shut down pools and to unsubscribe durable subscribers.
Usage example Normal usage includes by using this service in association with any JMS 1.1 business process. The service can also be used to shutdown pools and release durable subscribers.
Preconfigured? Yes.
Requires third-party files? The JMS provider jar must be provided to the system, by using one of the following methods:
  • Install by using the install3rdParty script
  • Load by using the custom classloader
For JBoss and WebLogic, you must use the custom classloader as these vendor jars contain classes that already exist in system classloader. For example, if you need to communicate to an external WebLogic JMS server, you need the jar file that includes the weblogic.jndi.WLInitialContextFactory class. You would obtain the jar file from the corresponding vendor or your trading partner.
Platform availability All supported platforms
Related services This service is used with the JMS 1.1 Acquire Connection and Session service and JMS 1.1 Send and Receive service. The JMS 1.1 connection and session required for Request Reply service are created by the JMS 1.1 Acquire Connection and Session service.
Application requirements None
Initiates business processes? No
Invocation Invoked as a step in a business process.
Business process context considerations None
Returned status values None
Restrictions None
Persistence level Minimum
Testing considerations Set the debug level ON from the Log screen in the system for Log.jms.

Configuring the JMS 1.1 Release Connection and Session Service

You must use the GPM to configure this service.

UI Field GPM Field Description
Name   Unique and meaningful name for the service configuration. Required.
Description   Meaningful description for the service configuration, for reference purposes. Required.
Select a Group   Select one of the options:
  • None – Do not include the configuration in a service group at this time.
  • Create New Group – Enter a unique name for a new group, which will be created with this configuration. (You can then add other services to the group as well.)
  • Select Group – If service groups already exist for this service type, they are displayed in the list. Select a group from the list.
  Config Select the name of the service configuration from the list.
  PIN_TO_THREAD Default is False. Do not change this value.
  POOL_LIST When the service is used to shut down a pool or unsubscribe a durable subscriber, POOL_LIST defines the name of the pool to be shut down. Select the pool name from the list. No default value. If all of the pools need to be shut down, select ALL_JMS_POOLS. Required when the mode is SHUTDOWN_POOL or UNSUBSCRIBE_DURABLE.
  RELEASE_ACTION Indicates whether the service is being used to release a connection and session, or to shut down a pool. Required. Valid values are:
  • NONE – Release connection and session to the pool
  • SHUTDOWN_POOL – use to shut down the pool
  • SHUTDOWN_RR – use to shut down RR
  • UNSUBSCRIBE_DURABLE - use to unsubscribe a durable subscriber
  RELEASE_DURABLE_SUBSCRIBER� Indicates the name of the durable subscriber.
  RR_LIST Lists all of the request reply instances created for permanent destination.
  SEGMENTED_POOL_LIST Name of the segmented pool needed to shut down or unsubscribe a durable subscriber in case the service is being used to shut down a pool. Select the pool name from the list. If all of the pools need to be shut down, select ALL_JMS_POOLS.

Business Process Examples

Pool names need to have a unique number added to them in addition to the name specified in the pool name. This number is changed when the pool is edited in acquire connection session service. As a best practice change the pool name when editing or updating a pool to avoid confusion.

Example 1

The following example illustrates how the JMS 1.1 Release Connection and Session service can be used in a business process to shut down a pool:

process name="default">
  <operation name="JMS11ReleaseConnSessionService">
    <participant name="testRegressionsReleaseConnSessionService"/>
    <output message="JMS11ReleaseConnSessionServiceInputMessage">
      <assign to="." from="*"></assign>
      <assign to="POOL_LIST">JMS11RegressionTestPoolForQueue_-484870860
           </assign>
      <assign to="RELEASE_ACTION">SHUTDOWN_POOL</assign>
    </output>
    <input message="inmsg">
      <assign to="." from="*"></assign>
    </input>
  </operation> 
</process> 

Example 2

The following example illustrates how the JMS 1.1 Release Connection and Session service can be used in a business process to shut down a reply request:

<process name="default">
  <operation name="JMS 1.1 Release Connection and Session Service">
    <participant name="testGPMSendRelease"/>
    <output message="JMS11ReleaseConnSessionServiceInputMessage">
      <assign to="." from="*"></assign>
      <assign to="RR_LIST">rr_to_shutdown</assign>
      <assign to="RELEASE_ACTION">SHUTDOWN_RR</assign>
    </output>
    <input message="inmsg">
      <assign to="." from="*"></assign>
    </input>
  </operation> 
</process>

Example 3

The following example illustrates how the JMS 1.1 Release Connection and Session service can be used in a business process to shut down a Segmented Pool or refresh the classloader for a pool:

<process name="default">
  <operation name="JMS 1.1 Release Connection and Session Service">
    <participant name="testGPMSendRelease"/>
    <output message="JMS11ReleaseConnSessionServiceInputMessage">
      <assign to="." from="*"></assign>
      <assign to="RELEASE_ACTION">SHUTDOWN_POOL</assign> 
<assign to="SEGMENTED_POOL_LIST">segmentedPool</assign>
    </output>
    <input message="inmsg">
      <assign to="." from="*"></assign>
    </input>
  </operation> 
</process>

Example 4

The following example illustrates how the JMS 1.1 Release Connection and Session service can be used in a business process to unsubscribe a durable subscriber:

<process name="default">
      <operation name="JMS 1.1 Release Connection and Session Service">
            <participant name="testGPMSendRelease" />
            <output message="JMS11ReleaseConnSessionServiceInputMessage">
                  <assign to="." from="*"</assign>><assign to="." from="*">
                          </assign>
                  <assign to="POOL_LIST">somePoolName</assign>
                  <assign to="RELEASE_ACTION">UNSUBSCRIBE_DURABLE</assign>
                  <assign to="RELEASE_DURABLE_SUBSCRIBER">durableSubscriberNam
                           </assign>e<assign to="RELEASE_DURABLE_SUBSCRIBER">
                                  durableSubscriberName</assign>
            </output>
            <input message="inmsg">
                  <assign to="." from="*"></assign>
            </input>
      </operation> 
</process>

Frequently Asked Questions

What are the various uses of JMS 1.1 Release Connection and Session service?

JMS 1.1 Release Connection and Session service serves the following purposes:
  • When used with other JMS services, and RELEASE ACTION is NONE, the service is used to return the connection and sessions created by the acquire service back to the pool.
  • When used alone, and the RELEASE ACTION is SHUTDOWN POOL, the service can be used to shut down the JMS pool or can be used to SHUTDOWN a segmented pool so that new jars can be used in place of the old ones for Custom Class Loading.
  • When used alone, and the RELEASE ACTION is SHUTDOWN RR, the service can be used to shut down the async receiver created by the JMS 1.1 Request Reply Service.
  • When used alone, and the RELEASE ACTION is UNSUBSCRIBE DURABLE SUBSCRIBER, the service can be used to unsubscribe the durable subscriber.

What is the difference between the POOL LIST and the SEGMENTED POOL LIST parameters in JMS 1.1 Release Connection and Session service?

All the JMS pools created using the dynamic classpath (classpath that Sterling B2B Integrator uses by default) are listed in POOL LIST. All the JMS pools created using Custom Class Loading are listed in the SEGMENTED POOL LIST.

The advantage of having a SEGMENTED POOL LIST is that if the customer plans to change the jars in the specified folder, all that needs to be done is (if it is an adapter then the adapter needs to be shut down first) to run the JMS 1.1 Release Connection and Session service, select the action as SHUTDOWN POOL and select the pool from SEGMENTED POOL LIST. This shutdowns the pool along with clearing the Custom Class Loader. Now the jars can be changed and a new class loader will be used to pick up these jars.