Fix (APAR): PQ96203 Status: Fix Release: 4.0.7,4.0.6,4.0.5 Operating System: All Supersedes Fixes: Pre-requisite Fixes: CMVC Defect: PQ96203 Byte size of APAR: 1072764 Date: 2004-11-02 Abstract: JMSEXCEPTION MQJMS1068: FAILED TO OBTAIN XARESOURCE Description/symptom of problem: Environment: WAS 4.0.5, EE 4.1 WAS MQ 5.3 Short Description: J2EE application sometimes fails to place mesage using JMS into WebSphere MQ Exceptions from application's log: 2004-06-28 22:19:14,738 DEBUG [Thread-28] ipgw.mdb. IpgwMatchMDBClientBean sendNewBlockFile: got JMSException [MQJMS1068: failed to obtain XAResource] javax.jms.JMSException: MQJMS1068: failed to obtain XAResource at com.ibm.mq.jms.services.ConfigEnvironment.newException (ConfigEnvironment.java:540) at com.ibm.mq.jms.MQXAQueueConnection.createXAQueueSession (MQXAQueueConnection.java:96) at com.ibm.ejs.jms.mq.JMSWrapXAQueueConnection. internalCreateXAQueueSession(JMSWrapXAQueueConnection.java:309 ) at com.ibm.ejs.jms.mq.JMSWrapXAQueueSession.createXASession (JMSWrapXAQueueSession.java:355) ... The problem was triggered by "XA operation failed" error (javax.transaction.xa.XAException) with error code -8 (which is XAER_DUPID, or duplicate XA id). WebSphere uses identityHashCode to generate the unique XID. When two objects return the same identityHashCode, WebSphere generates non-unique XIDs. This fix replaces the use of identityHashCode to generate the branch qualifies with a counter, which is incremeneted for each resource taking part in transaction. Directions to apply fix: 1) Create temporary "fix" directory to store the jar file: AIX: /tmp/WebSphere/fix Solaris/Linux: /tmp/WebSphere/fix Windows: c:\temp\WebSphere\fix 2) Copy jar file to the directory 3) Shutdown WebSphere. It is important that you perform a controlled and complete shutdown of the server to ensure that all transactions have completed, before installing the fix. 4) Run the jar file with the following command answering questions/prompts as they appear: java -jar PQ96203_Fix.jar 5) Restart WebSphere 6) The temp directory may be removed but the jar file should be saved. Do not remove any files created and stored in the /WebSphere/AppServer/fix/ directories. These files are required if a fix is to 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) Change directory to the fix location (/WebSphere/AppServer/fix/). 2) Shutdown WebSphere. It is important that you perform a controlled and complete shutdown of the server to ensure that all transactions have completed, before installing the fix. 3) Run the backup jar file with the following command: java -jar PQ96203_Fix_backup.jar 4) Restart WebSphere Directions to re-apply fix: Follow the instructions for applying a fix. If the backup files still exist (from the previous fix application), you will be prompted to overwrite. Answer "yes" at the overwrite prompts. Additional Information: