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 » IBM MQ Java / JMS » Native WMQ 2 Phase Commit Support

Post new topic  Reply to topic
 Native WMQ 2 Phase Commit Support « View previous topic :: View next topic » 
Author Message
sgarcia
PostPosted: Fri Oct 08, 2004 10:07 am    Post subject: Native WMQ 2 Phase Commit Support Reply with quote

Newbie

Joined: 30 Jul 2004
Posts: 3
Location: Richmond, CA

Hi, my application uses MQ 5.3 and Oracle 9i. Note that we use the native MQ Java libraries, NOT the JMS ones.

We need to implement 2PC in our application - committing to the database and to MQ at the same time. I am trying to investigate what we need to do for this to happen.

If anyone can answer these questions I would appreciate it very much.

1) We use WMQ 5.3. Do we need to configure our instance of MQ to operate in 2PC/XA mode? Do we need to install different MQ software? If there are links on this I would be happy to read them. (Our MQ administrator is looking into this as well.)

2) I have read several posts and seen examples where the MQQueueManager can act as the transaction manager http://www.mqseries.net/phpBB2/viewtopic.php?t=16691&highlight=2pc
but I don't know what assumptions these require.

We use MQ and the database in a distributed environment. Our application on one host, MQ on another, and the DB on another. Can we use the native MQQueueManager class as a transaction manager? Or to use the native java code does the application and MQ have to be on the same machine?

3) I've read some cursory sentences about needing a Transactional Client. What exactly does that mean? I think I have a general idea of what that means, but not sure.

4) If anyone has used the native MQ messaging code in a 2PC enviornment with an JDBC XADataSource, I would really like to hear your comments on this.

And if there are any other articles you can point me to, I'll read them.

Thanks, Steve
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
vennela
PostPosted: Fri Oct 08, 2004 11:35 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Quote:
Or to use the native java code does the application and MQ have to be on the same machine?


Yes
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jefflowrey
PostPosted: Fri Oct 08, 2004 11:46 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

In order to perform Two Phase commit, one of two things needs to be true.

You need to run your application and make a connection in Bindings mode - this is only possible when the code runs on the same machine as the queue manager.

OR

You need to run your application and make a connection in Client mode - WHEN THE INSTALLED CLIENT is the Extended Transactional Client.

So, either run it on the same machine as a queue manager or run it on the same machine as the Extended Transactional Client.

The ETC is not free like the regular client, and usually costs roughly the same as a queue manager. Consult your IBM sales representative to find out for sure.

In addition, you either need a transaction manager or you need to configure MQ as the transaction manager. You have a choice here. If you don't already have a transaction manager, use MQ.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sbixby
PostPosted: Fri Oct 08, 2004 1:27 pm    Post subject: Reply with quote

Newbie

Joined: 08 Oct 2004
Posts: 1

Quote:

In addition, you either need a transaction manager or you need to configure MQ as the transaction manager. You have a choice here. If you don't already have a transaction manager, use MQ.


I work with the original poster on this project and want to expand on this last item - as far as I've been able to determine, if we use ETC, we need a transaction manager too; if MQ server can act as the TM as you describe above, does it have to be running on the same box as the Java VM to be elegible for transactions?
_________________
Steven Bixby
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Oct 08, 2004 1:51 pm    Post subject: Reply with quote

Grand High Poobah

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

For Oracle you will need to have
<mqinstall>java/lib/jdbc on the LIBRARY_PATH/ LD_LIBRARY_PATH
You will also need to check the manuals for the stanza in qm.ini you need to add. Of course after that you need to restart the qmgr.

Using Oracle 9i why did you not use JMS in the app server or if oracle native the Oracle to MQ messaging gateway (JMS product). The gateway works fine for us. Moves messages from MQ to Oracle AQ...

Enjoy
Back to top
View user's profile Send private message Send e-mail
sgarcia
PostPosted: Fri Oct 08, 2004 2:29 pm    Post subject: Reply with quote

Newbie

Joined: 30 Jul 2004
Posts: 3
Location: Richmond, CA

Thanks for your replies. For clarification...

Quote:
For Oracle you will need to have
<mqinstall>java/lib/jdbc on the LIBRARY_PATH/ LD_LIBRARY_PATH


I assume you mean that the environment/system variables LIBRARY_PATH and LD_LIBRARY_PATH must have that path in them?

Quote:
Using Oracle 9i why did you not use JMS in the app server or if oracle native the Oracle to MQ messaging gateway (JMS product). The gateway works fine for us. Moves messages from MQ to Oracle AQ...


Great question. We had other products at our company that had a negative experience using the JMS MQSeries API, they said that the messages were somehow mangled when they were put on the queue. So we instead decided to use the native MQ Java API - with a lot of success.

We have not tried the Oracle to MQ messaging gateway, partly because it's a JMS issue. For us there is really no reason to use the JMS API as we will never move away from MQSeries platform. I'm not against using JMS platform at all and if there is a compelling reason to do so (that is the only way to do 2PC) then we'll move to it.

I was hoping to instead use the native code.

Quote:
You need to run your application and make a connection in Client mode - WHEN THE INSTALLED CLIENT is the Extended Transactional Client.


Makes sense. Is the installed client ETC 100% Java? Or is it composed of non Java stuff like DLL's?

Quote:
In addition, you either need a transaction manager or you need to configure MQ as the transaction manager. You have a choice here. If you don't already have a transaction manager, use MQ.


We do not have a transaction manager and I have no problem using MQ as the transaction manager. I've seen some code around to use that too - I'll check it out.

Thanks for the responses!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
sgarcia
PostPosted: Fri Oct 08, 2004 2:31 pm    Post subject: Reply with quote

Newbie

Joined: 30 Jul 2004
Posts: 3
Location: Richmond, CA

Oh yea, on Oracle's side all we need is an OracleXADataSource, correct? We don't need a special version or Oracle?

Thanks again.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Native WMQ 2 Phase Commit Support
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.