JMS Adapter: On Demand Connection (New Feature)
[adapter] [adodb.connection] [connection] [connection refused] [CONNECTION_TEST_POLL] [Demand] [french connection] [JMS] [On]
Related:
- Connect on Demand Feature for JMS AdapterSymptom You are using the SAP PI JMS Adapter with...
- Axis adapter’s connection timeout value settingSymptom The timeout value used by the standard trasnport handler...
- JMS Message DumpSymptom JMS adapter does not provide a message dump feature....
Symptom
A new feature has been introduced in the JMS adapter (receiver channel) to help reduce the number of open TCP/IP connections to IBM Websphere MQ JMS provider.
Other terms
JMS Adapter, On Demand Connection, Connection on Demand, CONNECTION_TEST_POLL
Reason and Prerequisites
When connecting to IBM Websphere MQ using PI JMS adapter, each channel creates a TCP/IP connection.
Since Websphere MQ (version 6 and below) does not notify the receiver JMS channel of a connection break, the CONNECTION_TEST_POLL feature is used for automatic reconnection.
The use of CONNECTION_TEST_POLL feature results in another TCP/IP connection being created per receiver channel. As a result the number of open TCP/IP connections can become very large.
Note that a separate TCP/IP connection in this case is created by the IBM Websphere MQ driver.
The JMS adapter uses the same connection object (as that used by the receiver channel to connect to destination), to create a temporary destination and send messages to it.
Kindly refer to SAP Note 948016 for details about CONNECTION_TEST_POLL.
Solution
The Connect on demand feature, allows the receiver channel to create a connection only when a message is to be delivered. The connection is then closed once the message is delivered.
In case the connection keep-alive time is greater than zero (by default this is zero), the connection is kept open after the delivery of the message for the amount of seconds specified in the keep-alive period. While the connection is active, if another message arrives then the connection is kept open for another X seconds (where X is the value for keep-alive period) after the new message is delivered.
Note that while using this feature automatic reconnection (in case of a connection break) is disabled.
Use of CONNECTION_TEST_POLL with this feature is invalid and is not recommended as it may result in unexpected behavior.
As of now this feature is only available for JMS receiver channels connecting to IBM Websphere MQ JMS provider.
Also since this feature requires changes to the Adapter Metadata and resource bundles (used for internationalization of text), therefore this will be available from 710 SP8 / 711 SP3 onwards.