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 » getTargetClient () doesn't work

Post new topic  Reply to topic
 getTargetClient () doesn't work « View previous topic :: View next topic » 
Author Message
rsinha
PostPosted: Tue Sep 09, 2003 11:05 am    Post subject: getTargetClient () doesn't work Reply with quote

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
View user's profile Send private message
vennela
PostPosted: Tue Sep 09, 2003 12:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
bower5932
PostPosted: Wed Sep 10, 2003 3:31 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
rsinha
PostPosted: Wed Sep 10, 2003 8:10 am    Post subject: Reply with quote

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
View user's profile Send private message
EddieA
PostPosted: Wed Sep 10, 2003 12:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » getTargetClient () doesn't work
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.