Author |
Message
|
Sandman |
Posted: Thu May 19, 2011 11:37 am Post subject: Using MQ as transaction coordinator for MQ/DB2 (z/OS) |
|
|
Centurion
Joined: 16 Oct 2001 Posts: 134 Location: Lincoln, RI
|
We have Java 1.6 apps running in Tomcat 6/Windows that use MQ v 7.0.1.3 (Windows) and DB2 v9 (z/OS).
We'd like to configure MQ to manage a two-phase commit of both MQ and DB2 resources. Some colleagues tried to do this, using both type4 and type2 connections with DB2Connect, but concluded that MQ cannot coordinate transactions in this way when the app uses JDBC to access DB2 on z/OS (though distributed DB2 evidently works).
I've also read that DB2 can coordinate the transaction, and we can issue MQ commands through DB2.
Can someone please point me in the right direction? We've been scouring the DB2 and MQ manuals, but it's very hard to find any specific restrictions listed that cover our installation.
Thank you. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu May 19, 2011 11:53 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
On z/OS, RRS (Recoverable Resource Services... or something like that) is the transaction-level coordinator. MQ apps on z/OS can use either the MQCMIT or SRRCMIT calls to commit the UofW. Good news if both DB2 and WMQ are on z/OS.
Are you trying to get a Windoze-based WMQ app to be the transaction coordinator of a UofW where the queue(s) are on Win AND the DB2 is on z/OS? Or have I misunderstood? _________________ 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 |
|
 |
mvic |
Posted: Thu May 19, 2011 1:44 pm Post subject: Re: Using MQ as transaction coordinator for MQ/DB2 (z/OS) |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
|
Back to top |
|
 |
Sandman |
Posted: Fri May 20, 2011 4:14 am Post subject: |
|
|
Centurion
Joined: 16 Oct 2001 Posts: 134 Location: Lincoln, RI
|
bruce2359 wrote: |
Are you trying to get a Windoze-based WMQ app to be the transaction coordinator of a UofW where the queue(s) are on Win AND the DB2 is on z/OS? Or have I misunderstood? |
Yes. |
|
Back to top |
|
 |
Sandman |
Posted: Fri May 20, 2011 4:18 am Post subject: Re: Using MQ as transaction coordinator for MQ/DB2 (z/OS) |
|
|
Centurion
Joined: 16 Oct 2001 Posts: 134 Location: Lincoln, RI
|
mvic wrote: |
Sandman wrote: |
We have Java 1.6 apps running in Tomcat 6/Windows that use MQ v 7.0.1.3 (Windows) and DB2 v9 (z/OS). |
As I understand it, your apps would be running in an application server - please confirm.
Isn't it the best idea to use the facilities in your application server to manage transaction scopes? |
Yes, but Tomcat doesn't provide any transactional functions.
But we've read about certain restrictions, i.e. JDBC database updates cannot be coordinated when DB2 is on z/OS - irrespective of what is being used to manage the transaction (i.e. MQ, DB2, app server, etc.). We're trying to confirm that this is indeed true (or not), specifically with these products on these platforms. |
|
Back to top |
|
 |
Sandman |
Posted: Wed May 25, 2011 5:26 am Post subject: |
|
|
Centurion
Joined: 16 Oct 2001 Posts: 134 Location: Lincoln, RI
|
bump
Anyone please???  |
|
Back to top |
|
 |
mvic |
Posted: Wed May 25, 2011 5:38 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
Sandman wrote: |
bump
Anyone please???  |
The only sensible design here is to use your application server's transaction facilities. I haven't used the application server you mentioned, so can't comment further about what facilities it has, or doesn't have. But maybe you need to be looking at using another application server, if your current one doesn't have the facilities you need. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed May 25, 2011 6:00 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I believe that the stuff you've heard about using DB2 to issue MQ commands is on the order of writing a DB2 stored procedure that uses DB2 facilities to read and write to queues. Then you would not have a separate MQ/JMS transaction at the JDBC side, that you were trying to coordinate. You would not even have any MQ/JMS code on the JDBC side, you'd only have your code write a JDBC call to the stored procedure.
Given that you're almost certainly trying to talk to a queue manager that is not running in the same LPAR as the DB2 on zOS you're talking to, this may not be what you actually want to do.
If you're trying to do any kind of two-phase commit between JDBC and JMS, then you need to be running your code inside a real JEE container - and Tomcat is merely a Servlet container to the best of my knowledge and not a JEE container. Look at Geronimo instead of Tomcat? |
|
Back to top |
|
 |
Sandman |
Posted: Wed May 25, 2011 6:29 am Post subject: |
|
|
Centurion
Joined: 16 Oct 2001 Posts: 134 Location: Lincoln, RI
|
I think this is different than simply issuing DB2 stored procedure calls.
But again, our first preference is to use MQ to coordinate, not DB2. And we actually got it working - but only when DB2 is on Windows, not on z/OS.
Quote: |
Database coordination
When the queue manager coordinates global units of work itself, it becomes possible to integrate database updates within the units of work. That is, a mixed MQI and SQL application can be written, and the MQCMIT and MQBACK verbs can be used to commit or roll back the changes to the queues and databases together.
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp |
|
|
Back to top |
|
 |
mqjeff |
Posted: Wed May 25, 2011 6:39 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Sandman wrote: |
I think this is different than simply issuing DB2 stored procedure calls.
Quote: |
Database coordination
When the queue manager coordinates global units of work itself, it becomes possible to integrate database updates within the units of work. That is, a mixed MQI and SQL application can be written, and the MQCMIT and MQBACK verbs can be used to commit or roll back the changes to the queues and databases together. |
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp |
That is talking about using the queue manager to coordinate transactions.
I was responding to
Sandman wrote: |
I've also read that DB2 can coordinate the transaction, and we can issue MQ commands through DB2. |
You need to review the full section here: http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.amqzag.doc/fa13430_.htm |
|
Back to top |
|
 |
Sandman |
Posted: Wed May 25, 2011 6:41 am Post subject: |
|
|
Centurion
Joined: 16 Oct 2001 Posts: 134 Location: Lincoln, RI
|
Sorry, I was editing that post at the same time that you replied. |
|
Back to top |
|
 |
Sandman |
Posted: Mon Jun 06, 2011 9:07 am Post subject: |
|
|
Centurion
Joined: 16 Oct 2001 Posts: 134 Location: Lincoln, RI
|
Any other input? NO ONE in the MQ community has used MQ/Win to coordinate a two-phase commit that includes DB2 for z/OS updates and MQ messages?  |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jun 06, 2011 9:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Sandman wrote: |
NO ONE in the MQ community has used MQ/Win to coordinate a two-phase commit that includes DB2 for z/OS updates and MQ messages?  |
Doesn't sound like it does it?
Do let us know how you get on...
FWIW where you've got z/OS DB2 you've got z/OS CICS and that tends to get the coordination job. Which is not to say you can't do what you're trying to do, or you shouldn't do what you're trying to do, or there isn't good & sufficient reason to do what you're trying to do.
Just that you seem to be the first to try it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Sandman |
Posted: Mon Jun 06, 2011 9:17 am Post subject: |
|
|
Centurion
Joined: 16 Oct 2001 Posts: 134 Location: Lincoln, RI
|
You're right, and we have done plenty of CICS transactions that read/put to queues, as well as update DB2. This time though, we have apps running on Windows that need to put MQ messages, as well as use JDBC to update DB2 - in the same unit of work.
As I mentioned, we got it working when DB2 is also on Windows; but not so when on z/OS. May be time to talk with IBM.
Thanks. |
|
Back to top |
|
 |
Sandman |
Posted: Wed Dec 07, 2011 12:49 pm Post subject: Update after opening PMR with IBM MQ Support |
|
|
Centurion
Joined: 16 Oct 2001 Posts: 134 Location: Lincoln, RI
|
They spent time reviewing logs and ultimately concluded that they think it's a DB2, not MQ, issue. They asked us to open a new PMR with DB2 Support, which we did.
Hopefully DB2 Support doesn't try to bounce us back to MQ Support!?  |
|
Back to top |
|
 |
|