|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WMQ & Database |
« View previous topic :: View next topic » |
Author |
Message
|
newtown |
Posted: Thu Nov 25, 2004 1:49 am Post subject: WMQ & Database |
|
|
 Novice
Joined: 03 Feb 2003 Posts: 16
|
Hi there,
I need some help on MQ JAVA stuff. I am able to pick up message from a queue, but how do I put/ insert the message in db as single transaction.? The message is in XML format? Do I need to convert the XML message to string and then add into the table....
Please help for any suggestions, as I am very new to Java sugar syntax
Thanks in advance
newtown |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Nov 26, 2004 5:00 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
|
Back to top |
|
 |
newtown |
Posted: Sun Nov 28, 2004 7:30 pm Post subject: |
|
|
 Novice
Joined: 03 Feb 2003 Posts: 16
|
Thanks for your reply & site.
I am afraid the requirements are for JMS no JavaAPI, if you have any samples MQ jms, that would really be good. …Can you please direct me to it...
Help is appreciated |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Nov 28, 2004 7:36 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you are using JMS here is the setup you need:
qmgr on same machine as apps server using a bindings connection for the XAqcf (2 phase commit). Make sure the XA check box is set for your QCF or that your JNDI setup specifies an XAQCF.
Any JMS consumer will do. Make sure the consumption method has attribute Transaction required or new Transaction or that you use a user transaction....
You will need an XADATASOURCE for your JDBC connection.
Now you can extract the data from the JMS message and post it to the DB via the jdbc connection (extracted from the XADatasource) all within the same transaction (2 phase commit)
As for samples check out the USING Java manual for the JMS part and for the jdbc part any sample on the net will show you how to do it.
Enjoy  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|