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 Index » Multiphase Commit » Does Websphere MQ support JTA?

Post new topic  Reply to topic
 Does Websphere MQ support JTA? « View previous topic :: View next topic » 
Author Message
yashgt
PostPosted: Wed Nov 12, 2014 1:57 am    Post subject: Does Websphere MQ support JTA? Reply with quote

Apprentice

Joined: 11 Nov 2014
Posts: 38

Hi,

I am aware that WMQ supports XA. JTA is the Java form of XA. Java Spring uses a JTATransactionManager for managing transactions using a JTA transaction manager like JBoss or Atomikos.

Does WMQ support JTA? Can JTATransactionManager work with WMQ as the Transaction Coordinator?

Thanks,
Yash
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Nov 12, 2014 6:09 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Search Google for 'mq+jta'.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Nov 12, 2014 7:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

And search JMS + JTA.
Remember WMQ is JMS compliant.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
yashgt
PostPosted: Thu Nov 13, 2014 12:42 am    Post subject: Reply with quote

Apprentice

Joined: 11 Nov 2014
Posts: 38

From my analysis so far:
MQ uses JTA for communicating with Resource Managers.

An application can use WMQ classes to initiate dist. transactions. But the API for doing so does not conform to JTA. For e.g. WMQ does not expose a UserTransaction interface which is part of JTA.
Due to this, spring's JTA Transaction Manager class which is the client for starting a JTA transaction cannot be used when working with WMQ as the Txn Coordinator.

Only if we install Websphere Application Server, we will get JTA capability which is not available with standalone Websphere MQ.

Let me know if I am missing something.
Back to top
View user's profile Send private message
MQsysprog
PostPosted: Thu Nov 13, 2014 2:20 am    Post subject: Reply with quote

Centurion

Joined: 24 Feb 2014
Posts: 116

Hello .

you will find here ,an official statement about MQ and jta support :

http://www-01.ibm.com/support/docview.wss?uid=swg21266535
Back to top
View user's profile Send private message
yashgt
PostPosted: Thu Nov 13, 2014 10:21 pm    Post subject: Reply with quote

Apprentice

Joined: 11 Nov 2014
Posts: 38

Thanks. It is now clear that if we to use WMQ as Txn coordinator, we have to only use its custom API and not the API specified by JTA.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 14, 2014 2:41 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

yashgt wrote:

Due to this, spring's JTA Transaction Manager class which is the client for starting a JTA transaction cannot be used when working with WMQ as the Txn Coordinator...

Very strange comment (but true). I would expect the spring JTA Transaction Manager to be JTA compliant. So why would you want to use a different (non J2EE) Transaction Manager with that framework? You should be using the JMS API and let the spring JTA Transaction Manager coordinate the transaction!.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
yashgt
PostPosted: Sat Nov 15, 2014 12:07 am    Post subject: Reply with quote

Apprentice

Joined: 11 Nov 2014
Posts: 38

"let the spring JTA Transaction Manager coordinate the transaction"

Spring JTA Transaction manager is JTA compliant. So any coordinator like JBOSS/Atomikos, etc. can act as a Transaction coordinator and Sprint JTA Txn Mgr works fine with it.

But WMQ does not expose the JTA interface which Sprint JTA can consume.

So Spring JTA cannot be used.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Nov 15, 2014 3:30 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

yashgt wrote:
"let the spring JTA Transaction Manager coordinate the transaction"

Spring JTA Transaction manager is JTA compliant. So any coordinator like JBOSS/Atomikos, etc. can act as a Transaction coordinator and Sprint JTA Txn Mgr works fine with it.

But WMQ does not expose the JTA interface which Sprint JTA can consume.

So Spring JTA cannot be used.

And you're not using the JMS API because ???
Why does MQ have to be the transaction coordinator and not just a resource used by the Spring JTA transaction manager?
Isn't the Spring JTA transaction manager a transaction manager in it's own right???

Please read http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/transaction.html and use a JTA transaction, not a local resource transaction.

There's a million ways to achieve the goal. You don't have to choose the one that will not work.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Multiphase Commit » Does Websphere MQ support JTA?
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.