Fix (APAR): PQ89393 Status: Fix Release: 5.0.2.3 Operating System: All Supersedes Fixes: CMVC Defect: PQ89393 Byte size of APAR: 385996 Date: 2005-02-02 Abstract: Message-driven beans fail to handle Runtime Exceptions properly Description/symptom of problem: When using Message-driven beans (MDBs) within WebSphere Application Server Version 5.x, a Listener Port must also be defined. The Listener Port is used to deliver messages to the MDBs. One of the properties of a Listener Port is Max retries, which defines the number of times the Listener Port attempts to deliver a message to an MDB before shutting itself down. If a Message-driven bean (MDB) running within WebSphere Application Server Version 5.x throws an error while processing a message, the application server will roll the message back to the queue where it originated from. The delivery count of the message is then checked against the Max retries property of the Listener Port associated with the MDB. If the delivery count is greater than the value of Max retries, the Listener Port should be shut down. However, if an MDB throws a runtime exception while a message is being processed, the Listener Port will continue to deliver messages to the MDB even if the delivery count of the message is greater than the value of Max retries! For example, when a runtime exception is thrown from the onMessage() method while processing message N, the Listener Port continues to deliver messages (N+1), (N+2), etc. Sometimes it stops after just delivering one more message, while at other times it delivers several more messages before stopping. After restarting the application server, the Listener Port redelivers message N followed by (N+2), (N+3), etc. (assuming only (N+1) was delivered following the exception). This can lead to messages being processed out of their correct sequence. Directions to apply fix: NOTE: YOU MUST FIRST DOWNLOAD THE UPDATE INSTALLER TOOL IN ORDER TO INSTALL A FIX. The Fix Installer can be downloaded from the following link: http://www-3.ibm.com/software/webservers/appserv/support/index.html 1) Create temporary "fix" directory to store the jar file: UNIX: /tmp/WebSphere/fix Windows: c:\temp\WebSphere\fix 2) Copy jar file to the directory 3) Shutdown WebSphere 4) Follow the Fix installation instructions that are packaged with the Fix Installer on how to install the Fix. 5) Restart WebSphere 6) The temp directory may be removed. Directions to remove fix: NOTE: FIXES MUST BE REMOVED IN THE ORDER THEY WERE APPLIED. DO NOT REMOVE A FIX UNLESS ALL FIXES APPLIED AFTER IT HAVE FIRST BEEN REMOVED. YOU MAY REAPPLY ANY REMOVED FIX. Example: If your system has fix1, fix2, and fix3 applied in that order and fix2 is to be removed, fix3 must be removed first, fix2 removed, and fix3 re-applied. 1) Shutdown WebSphere 2) Follow the instructions that are packaged with the Fix Installer on how to uninstall the Fix. 3) Restart WebSphere Directions to re-apply fix: 1) Shutdown WebSphere 2) Follow the Fix instructions that are packaged with the Fix Installer on how to uninstall and reinstall the Fix. 3) Restart WebSphere Additional Information: