|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| MQ JMS API, XA recovery issue, Weblogic as TM | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | abhay09 | 
			  
				|  Posted: Wed Jul 13, 2016 11:26 pm    Post subject: MQ JMS API, XA recovery issue, Weblogic as TM |   |  |  
		  | Acolyte
 
 
 Joined: 31 May 2016Posts: 66
 
 
 | 
			  
				| Hi All, 
 We are using MQ JMS API to connect to MQ and all message flows are under XA transaction using Weblogic Transaction manager
 
 While testing XA recovery, we faced one issue and need help.
 
 Scenario:
 
 1.) 2 QM ,
 2.) Read from one QM (Queue1 ) and put into other QM (Queue2) using MQ JMS API.
 3.) Weblogic as Transaction Manager
 4.) Application hosted on WL
 
 To test recovery, we forcefully killed the server on "prepare()" method of XA resource by using System.exit(1).
 
 public int prepare(Xid xid) throws XAException {
 System.exit(1);
 return resource.prepare(xid);
 }
 
 Now, my application:
 - Started a transaction
 - Enlisted QM 1 (Queue1) XA resource
 - Get message from MQ QM 1 (Queue1)
 - Enlisted QM 2 (Queue2) XA resource
 - Called txn.commit() method
 - As this is Xa transaction , so it will 2 phase commit
 - Prepare method will be called
 - And System crashes
 
 
 - After Crash, observations
 
 - Message rollbacked to MQ QM 1 (Queue1)
 - But there is increase in count of QM 2 (Queue2), but cant browse any message
 
 - Updated code to remove System.exit(1);
 - Build code
 
 - On restart of Weblogic
 
 - No transaction is pending under WL as nothing mentioned in logs and WL console
 
 - WL started a new txn and read message from QM 1 (Queue1) and delivered to QM 2( Queue2)
 
 - Now, count of QM2 (Queue 2) increased to 2.
 
 - Can browse only 1 out of 2
 
 So, question is why QM2 (Queue 2) count increased when server crashed
 and for WL transaction rollbacked , so no pending txn for recovery.
 
 
 Please let me know how to handle this case.
 
 Why QM 2( Queue2) count increases when transaction is roll backed.
 
 
 Please let me know for any more information.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | abhay09 | 
			  
				|  Posted: Thu Jul 14, 2016 9:33 pm    Post subject: |   |  |  
		  | Acolyte
 
 
 Joined: 31 May 2016Posts: 66
 
 
 | 
			  
				| Guys, Please help here.
 
 Any  suggestions will be appreciated.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | mqjeff | 
			  
				|  Posted: Fri Jul 15, 2016 4:04 am    Post subject: |   |  |  
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| If you're having an issue with the Weblogic XA transaction manager, maybe you should discuss this on an Weblogic forum. 
 If you're seeing messages rolled back to an input queue, and left uncommitted on an output queue - which you are seeing because the output messages are not visible but the queue depth has increased - then it appears to be an issue with the transaction manager in question.
 
 You should make sure you are using JMS to access MQ.  You should make sure you are using the appropriate JMS version/Resource Adapter for the version of Weblogic you are using.
 
 And you should discuss issues with XA using Weblogic as a transaction controller for JMS messaging on a Weblogic forum/stackoverflow/whatever.
 _________________
 chmod  -R ugo-wx /
 |  |  
		  | Back to top |  |  
		  |  |  
		  | fjb_saper | 
			  
				|  Posted: Fri Jul 15, 2016 5:28 am    Post subject: |   |  |  
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				|   
 Looks to me like Weblogic on start up may not have the correct JAAS user / rights to resume/resolve pending JMS transactions.
  _________________
 MQ & Broker admin
 |  |  
		  | Back to top |  |  
		  |  |  
		  |  |  |  
  
	|    |  | Page 1 of 1 |  
 
 
  
  	| 
		
		  | 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 
 |  |  |  |