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 » WMQ & Database

Post new topic  Reply to topic
 WMQ & Database « View previous topic :: View next topic » 
Author Message
newtown
PostPosted: Thu Nov 25, 2004 1:49 am    Post subject: WMQ & Database Reply with quote

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
View user's profile Send private message
bower5932
PostPosted: Fri Nov 26, 2004 5:00 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

If you are using java (and not jms), there is a sample at:

http://www.developer.ibm.com/tech/sampmq.html

It is called mqdb2log.java.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
newtown
PostPosted: Sun Nov 28, 2004 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sun Nov 28, 2004 7:36 pm    Post subject: Reply with quote

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
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 » IBM MQ Java / JMS » WMQ & Database
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.