After a WebSphere Application Server V5 JVM crash during MDB message processing, messages are not rolled back to the queue
 Technote (troubleshooting)
 
Problem(Abstract)
If an IBM® WebSphere® Application Server V5 JVM™ crashes while a message-driven bean (MDB) is processing messages from a WebSphere MQ V5.3 queue, the messages will not always be rolled back to the queue upon JVM restart.
 
Cause
This problem will happen if the JMS connection factory that is associated with the MDB's listener port is XA-enabled and its Transport type property is set to CLIENT. If the transaction in which the messages are being processed has not progressed to the prepared state, no recovery will be attempted by WebSphere Application Server during the restart. In this case, it is the responsibility of the resource manager (JMS/MQ) to rollback the branch work done as part of the transaction.

In order to instruct WebSphere MQ to detect that the application server has been terminated, the ClientIdle property can be set on the queue manager.
 
Resolving the problem
The ClientIdle property instructs the queue manager to detect whether the client, in this case the WebSphere Application Server JVM, is available. If it is no longer available, the queue manager can then rollback the transaction branch. This rollback would include putting the unprocessed messages back onto the queue.


To set the ClientIdle property, do the following.

In the QM.ini file, create a new stanza as follows:

Channels:
ClientIdle=<val_in_secs>

On Windows®, the following command can be used:

amqmdain reg <qm_name> -c add -s Channels -v ClientIdle=<val_in_secs>

Then restart the queue manager.

The use of the ClientIdle property only has an effect if the connection factory is XA-enabled and uses the CLIENT transport type. An alternative to setting the ClientIdle property is to change the connection factory to not enable XA or change its transport type to BINDINGS. In either of these cases, the messages will be rolled back automatically without the use of the ClientIdle property.

 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java Message Service (JMS)
Operating system(s): Windows
Software version: 5.1.1.7
Software edition:
Reference #: 1223161
IBM Group: Software Group
Modified date: Nov 18, 2005