|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to set MQPMO and MQGMO options if using JMS |
« View previous topic :: View next topic » |
Author |
Message
|
mqjl |
Posted: Tue May 22, 2007 12:03 pm Post subject: How to set MQPMO and MQGMO options if using JMS |
|
|
Newbie
Joined: 22 May 2007 Posts: 2
|
Does anyone know how to set the MQPMO and MQGMO options when using JMS instead of java for MQ? Using direct MQ java, you can create and set the MQPutMessageOptions passing it in on the put command (same on get). With JMS, these properties do not exist. Is there a work-around to set these options while JMS? Can they be configured on the queue manager rather than by the application? Thanks in advance. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 22, 2007 12:41 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
What exactly are you looking for?
You need to look for a specific case and let us know how you'd look about solving it....
A lot can be done but then we go into proprietary options (JMS_IBM_xxxx).
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjl |
Posted: Tue May 22, 2007 2:26 pm Post subject: How to set MQPMO and MQGMO options if using JMS |
|
|
Newbie
Joined: 22 May 2007 Posts: 2
|
My old code sets the MQPMO options using java for MQ:
pmo.options = MQC.MQPMO_FAIL_IF_QUIESCING | MQC.MQPMO_SET_IDENTITY_CONTEXT
|MQC.MQPMO_SYNCPOINT;
I am now switching the code to use JMS using Spring. In JMS, I do not see anyway to set these specific IBM MQ options. Is there a work-around to set these while using JMS?
Thanks. |
|
Back to top |
|
 |
Cyrille Le Clerc |
Posted: Wed May 23, 2007 2:51 am Post subject: Re: How to set MQPMO and MQGMO options if using JMS |
|
|
Novice
Joined: 23 May 2007 Posts: 12 Location: France
|
Hello mqjl,
Here are the MQ native to JMS mappings :
MQPMO_FAIL_IF_QUIESCING : see MQConnectionFactory.setFailIfQuiesce(int) with JMSC.MQJMS_FIQ_YES (default) and JMSC.MQJMS_FIQ_NO.
MQPMO_SYNCPOINT: see connection.createSession(boolean transacted,int acknowledgeMode) , session.commit(), session.rollback().
MQC.MQPMO_SET_IDENTITY_CONTEXT: JMS implementation set UserIdentifier(JMSXUserID) and PutApplName (JMSXAppID) fields at send time.
Enjoy your move to JMS and Spring, you'll get very nice benefits (BTW, once on JMS, talk to your dev team about AvtiveMQ "in VM" mode for JUnit tests, it's really interesting).
Hope this helps,
Cyrille _________________ Cyrille Le Clerc
cyrille@cyrilleleclerc.com
cleclerc@xebia.fr
http://blog.xebia.fr |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed May 23, 2007 12:31 pm Post subject: Re: How to set MQPMO and MQGMO options if using JMS |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Cyrille Le Clerc wrote: |
MQC.MQPMO_SET_IDENTITY_CONTEXT: JMS implementation set UserIdentifier(JMSXUserID) and PutApplName (JMSXAppID) fields at send time.
|
Typically the identity cannot be set. However check client connection using qcf.createConnection(username, passwd)
Now the PutApplName will always be the same. It is fixed for a JMSApp. If you need something different and the target is a JMSApp I suggest you look at the JMS header (RFH header).
Last but not least if the source/target is not a JMS app with MQV6.0 you have qcf.setClientMatching (or something of the kind) and of course you can always use either JNDI or the uri format : "queue://QMGR/QNAME?targetClient=1" to suppress the JMS header on the send.
Enjoy  _________________ MQ & Broker admin |
|
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
|
|
|
|