ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexIBM MQ Java / JMSMQ JMS API, XA recovery issue, Weblogic as TM

Post new topicReply to topic
MQ JMS API, XA recovery issue, Weblogic as TM View previous topic :: View next topic
Author Message
abhay09
PostPosted: Wed Jul 13, 2016 11:26 pm Post subject: MQ JMS API, XA recovery issue, Weblogic as TM Reply with quote

Acolyte

Joined: 31 May 2016
Posts: 54

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
View user's profile Send private message
abhay09
PostPosted: Thu Jul 14, 2016 9:33 pm Post subject: Reply with quote

Acolyte

Joined: 31 May 2016
Posts: 54

Guys,
Please help here.

Any suggestions will be appreciated.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jul 15, 2016 4:04 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17307

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.
_________________
Read, Think, Try, Repeat
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jul 15, 2016 5:28 am Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19210
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
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ Java / JMSMQ JMS API, XA recovery issue, Weblogic as TM
Jump to:



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
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.