Fix (APAR): PK27230 Status: Fix Release: 5.0.2.18 Operating System: AIX,HP-UX,Linux,Solaris,Windows Supersedes Fixes: CMVC Defect: PK27230 Byte size of APAR: 13487 Date: 2006-08-29 Abstract: When using WebSphere Application Server Version 5.x with WebSphere MQ Version 5.3 Fix Pack 12 (or later) or WebSphere MQ Version 6.0 Refresh Pack 1 (6.0.1.0) as the JMS provider, t Description/symptom of problem: PK27230 resolves the following problem: ERROR DESCRIPTION: When WebSphere Application Server (WAS) decides to roll back a failed transaction, it issues an xa_end() followed by an xa_rollback() to the queue manager. Prior to WebSphere MQ (WMQ) Version 5.3 CSD12, when the xa_end() was issued, the queue manager simply marked the transaction for rollback. The transaction would then be rolled back when xa_rollback() was called. However, when using WMQ 5.3 CSD12 (or later), the queue manager will actually roll back the transaction when xa_end() is called. When the application server then calls xa_rollback(), the queue manager returns the error code XA_RBROLLBACK, as the transaction has already been rolled back. This behavior will be changed back to marked for roll back. The exception will most likely look like: [6/7/06 11:07:49:019 CEST] 1883883b XATransaction E J2CA0027E: An exception occurred while invoking rollback on an XA Resource Adapter from dataSource JMS$ConnectionFactory , within transaction ID {}: javax.transaction.xa.XAException: XA operation failed, see errorCode at com.ibm.mq.MQXAResource.rollback(MQXAResource.java:379) at com.ibm.ejs.jms.JMSManagedSession$JMSXAResource.rollback(JMSMana gedSesson.java:1311) at com.ibm.ejs.j2c.XATransactionWrapper.rollback(XATransactionWrapp er.java 1266).. LOCAL FIX: None PROBLEM SUMMARY USERS AFFECTED: This problem affects customers who use WebSphere MQ Version 5.3 or Version 6.x as the JMS provider for WebSphere Application Server Version 5.x. PROBLEM DESCRIPTION: When using WebSphere Application Server Version 5.x with WebSphere MQ Version 5.3 Fix Pack 12 (or later) or WebSphere MQ Version 6.0 Refresh Pack 1 (6.0.1.0) as the JMS provider, the following error appears in the application server's SystemOut.log file when a message is rolled back: J2CA0027E: An exception occurred while invoking rollback on an XA Resource Adapter from dataSource , within transaction ID : javax.transaction.xa.XAException: XA operation failed, see errorCode at com.ibm.mq.MQXAResource. rollback(MQXAResource.java:379) at com.ibm.ejs.jms. JMSManagedSession$JMSXAResource. rollback (JMSManagedSession.java:1311) at com.ibm.ejs.j2c. XATransactionWrapper.rollback (XATransactionWrapper.java:1266) : : : : : : : : Encountered an XA resource error during an XA rollback operation: error code: XA_RBROLLBACK javax.transaction.xa.XAException: XA operation failed, see errorCode at com.ibm.mq.MQXAResource. rollback(MQXAResource.java:379) at com.ibm.ejs.jms. JMSManagedSession$JMSXAResource. rollback (JMSManagedSession.java:1311) at com.ibm.ejs.j2c. XATransactionWrapper.rollback (XATransactionWrapper.java:1266) at com.ibm.ejs.jts.jta.portable. JTAXAResourceImpl.rollback (JTAXAResourceImpl.java:616) : : : : : : : : RECOMMENDATION: None This problem was caused by a change in behaviour introduced by WebSphere MQ APAR IY76314 (shipped as part of WebSphere MQ Version 5.3 Fix Pack 12 and WebSphere MQ Version 6.0 Refresh Pack 1 (6.0.1.0)). When WebSphere Application Server decides to roll back a failed transaction, it issues an xa_end() followed by an xa_rollback() to the queue manager. Any errors thrown by the queue manager when xa_end() is called are ignored. Prior to APAR IY76314, when the xa_end() was issued, the queue manager simply marked the transaction for rollback. The transaction would then be rolled back when xa_rollback() was called. However, when using WMQ 5.3 CSD12 (or later) or WMQ 6.0.1.0 (or later), the queue manager will actually roll back the transaction when xa_end() is called. When the application server then calls xa_rollback(), the queue manager returns XA_RBROLLBACK, as the transaction has already been rolled back. As the application server is not expecting this return code, it throws the J2CA0027E error mentioned above. However, it is perfectly valid for WMQ to return this return code if it has previously told the application server that it has rolled back the message while processing the xa_end(). It does this by returning XA_RBROLLBACK from xa_end(). The application server ignores this, as it is a valid return value. PROBLEM CONCLUSION: In order to fix the problem, the JMSManagedSession class has been modified to store the ignored exception, should one be returned from xa_end(). If an exception occurs in xa_rollback(), a check is made to see if this is the same exception as was previously received from xa_end(). If it is, then the exception is swallowed up - however, if the exceptions are different, it is rethrown to the caller. The fix for this APAR is currently targeted for inclusion in Cumulative Fix 13 for WebSphere Application Server Version 5.1.1 and fixpacks 6.0.2.15 and 6.1.0.4 for WebSphere Application Server version 6. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980 Directions to apply fix: NOTE: Choose the: 1) Release the fix applies to 2) The Editions that apply 3) Delete the Editions & Methods that do not apply and this Note Fix applies to Editions: Release: 5.0 5.1 ___ ___ Application Server (Express or BASE) ___ Enterprise Edition (DD) ___ ___ Network Deployment (ND) ___ ___ Edge Components ___ ___ Developers Edition ___ ___ Tools ___ WebSphere Business Integration Server Foundation (WBISF) Install Fix to: Method: __ Application Server Nodes __ Deployment Manager Nodes __ Both NOTE: The user must: * Have Administrative rights in Windows, or be the Actual Root User in a UNIX environments. * Be logged in with the same authority level when unpacking a fix, fix pack or refresh pack. The Update Installer can be downloaded from the following link: http://www.ibm.com/support/docview.wss?rs=180&uid=swg21205991 The Update Installer for V5.0 does not have a maintenance directory. It uses fixpacks and fixes as the location of the unpacked files. 1) Copy PKxxxxx.jar file directly to the maintenance directory 2) Shutdown WebSphere Manually execute setupCmdLine.bat in Windows or . ./setupCmdLine.sh in Unix from the WebSphere instance that maintenance is being applied to. 3) Launch Update Installer 4) Enter the installation location of the WebSphere product you want to update. 5) Select the "Install maintenance package" operation. 6) Enter the file name of the maintenance package to install (PKxxxxx.jar file which was copied in the maintenance directory). The V5.0 and V5.1 fix packs and fixes are unpacked as .jar files and should be unpacked into fixpacks or fixes directory. 7) Install the maintenance package. 8) Restart WebSphere Directions to remove fix: NOTE: * The user must have Administrative rights in Windows, or be the Actual Root User in a UNIX environments. * 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 Manually execute setupCmdLine.bat in Windows or . ./setupCmdLine.sh in Unix from the WebSphere instance that uninstall is being run against. 2) Start Update Installer 3) Enter the installation location of the WebSphere product you want to remove the fix. 4) Select "Uninstall maintenance package" operation. 5) Enter the file name of the maintenance package to uninstall (PKxxxxx.jar). 6) UnInstall maintenance package. 7) Restart WebSphere Directions to re-apply fix: 1) Shutdown WebSphere. 2) Follow the Fix instructions to apply the fix. 3) Restart WebSphere. Additional Information: