|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
getTargetClient () doesn't work |
« View previous topic :: View next topic » |
Author |
Message
|
rsinha |
Posted: Tue Sep 09, 2003 11:05 am Post subject: getTargetClient () doesn't work |
|
|
Apprentice
Joined: 29 Aug 2003 Posts: 42
|
Hi,
After getting the Queue object from JNDI, I'm trying to determin if the Target Client for this queue is JMS or MQ -
int tc = sendQ.getTargetClient();
My code doesn't even compile and get following error -
cannot resolve symbol
[javac] symbol : method getTargetClient ()
[javac] location: interface javax.jms.Queue
[javac] int tc = sendQ.getTargetClient();
Since Queue is a subinterface of Destination, which is supposed to have this method, does any body know why I can't do it this way? Whats the correct way of getting the target client for a queue? |
|
Back to top |
|
 |
vennela |
Posted: Tue Sep 09, 2003 12:02 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
rsinha
Quote: |
[javac] location: interface javax.jms.Queue |
You are looking for the wrong class.
You are looking at the documentation of com.ibm.mq.jms.MQQueue and you are referring to interface javax.jms.Queue
-------
Venny |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Sep 10, 2003 3:31 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
For what it is worth, doing this check will make your code MQ specific since this is an MQ provider specific method and not part of the JMS spec. |
|
Back to top |
|
 |
rsinha |
Posted: Wed Sep 10, 2003 8:10 am Post subject: |
|
|
Apprentice
Joined: 29 Aug 2003 Posts: 42
|
OK, then how do I find out using JMS, if a particular queue is configured for adding JMS MQRFH2 header, which is what TargetClient can tell you. The program that I've written can be called by various projects, who may/may not want to add MQRFH2 header + <usr> folder. I want my program to return an error if I detect that the calling programs have requested to add RFH2 and <usr> folder, but the Q is confiured to be TC(MQ), meaning Target Client is MQ, not JMS, hence JMS won't add any RFH2 header.
Thanx |
|
Back to top |
|
 |
EddieA |
Posted: Wed Sep 10, 2003 12:24 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
You can make the call as suggested.
What the previous post was trying to point out is that once you include this, you have made your program IBM JMS specific. It will not run, unless changed, on other messaging systems.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
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
|
|
|
|