|
Problem |
An application running in WebSphere® Application Server V5
or V6 may receive failures when sending messages to, or receiving messages
from, a WebSphere MQ or Embedded Messaging queue. The MQ reason code
associated with the error is 2019. For example:
javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue
at
com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:540)
at com.ibm.mq.jms.MQSession.consume(MQSession.java:2950)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1484)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
at
com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
...
---- Begin backtrace for Nested Throwables
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
at com.ibm.mq.jms.MQSession.consume(MQSession.java:2924)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1484)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
at
com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
...
Note that the cause of the JMSException can be determined by the MQ reason
code that appears in the backtrace. In this case, it is reason code
2019. |
|
Cause |
Reason code 2019 usually occurs after a connection broken
error (reason code 2009) occurs. You would see a JMSException with reason
code 2009 preceding reason code 2019 in the SystemOut.log. Reason code
2009 indicates that the connection to the MQ queue manager is no longer
valid, usually due to a network or firewall issue.
Reason code 2019 errors will occur when invalid connections remain in
the connection pool after the reason code 2009 error occurs. The next time
that the application tries to use one of these connections, the reason
code 2019 occurs.
|
|
Solution |
To resolve the problem, change the Purge Policy for
the connection and session pools used by your queue connection factory
(QCF) or topic connection factory (TCF) from its default value of
FailingConnectionOnly to EntirePool. With this setting, the
entire pool of connections will be purged when the reason code 2009 error
occurs and no broken connections will remain in the pool.
To do this:
- Select the QCF or TCF that your application is using in the
Administration Console.
- Under Additional Properties: Select Connection Pool and set the
Purge Policy to EntirePool.
- Then select Session Pools and set the Purge Policy to
EntirePool.
- After making these changes, save your configuration and
- Restart the application server for the changes take effect.
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|
|