Author |
Message
|
yashgt |
Posted: Wed Nov 12, 2014 1:57 am Post subject: Does Websphere MQ support JTA? |
|
|
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 |
|
 |
bruce2359 |
Posted: Wed Nov 12, 2014 6:09 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 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 |
|
 |
fjb_saper |
Posted: Wed Nov 12, 2014 7:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And search JMS + JTA.
Remember WMQ is JMS compliant.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
yashgt |
Posted: Thu Nov 13, 2014 12:42 am Post subject: |
|
|
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 |
|
 |
MQsysprog |
Posted: Thu Nov 13, 2014 2:20 am Post subject: |
|
|
Centurion
Joined: 24 Feb 2014 Posts: 116
|
|
Back to top |
|
 |
yashgt |
Posted: Thu Nov 13, 2014 10:21 pm Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Fri Nov 14, 2014 2:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 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 |
|
 |
yashgt |
Posted: Sat Nov 15, 2014 12:07 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Sat Nov 15, 2014 3:30 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 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 |
|
 |
|