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 » 2058 On Queue Manager alias

Post new topic  Reply to topic
 2058 On Queue Manager alias « View previous topic :: View next topic » 
Author Message
vc1981
PostPosted: Thu Aug 30, 2007 6:13 am    Post subject: 2058 On Queue Manager alias Reply with quote

Apprentice

Joined: 18 Jan 2006
Posts: 46

Hi ,

I have a synchronous message flow set-up where by the reply is sent via queue manager aliases.While putting the reply back i am getting an 2058

The reply final needs to be sent to a queue named A1 under queue manager A.
The response application is connecting to queue manager C and tryng to put the message to Queue A1 , Queue Manager A .We have an qmgr alias named A under queue manager C and the Setup between A and C are perfectly fine .

But when my application Connects to Queue manager C and tries put an response back it gets and error 2058. Is it that for such instances where by the actual queue manager to which the message needs to be sent is not the one to which the application is connected do we need to make any special changes in java code. ??

Please advise!



bits of my code are as mentioned below :

MQEnvironment.hostname=hostname;
MQEnvironment.channel=channel;
MQEnvironment.port=Integer.parseInt(port);
mqqueuemanager = new MQQueueManager(qmanagername);
.
.
.
.

int openOptions = MQC.MQOO_OUTPUT;
queue = mqqueuemanager.accessQueue(qname,
openOptions,
null,
null, // no dynamic q name
null); // no alternate user id


MQMessage objMQMessage = new MQMessage();
objMQMessage.writeString(message);
objMQMessage.replyToQueueManagerName = "TEST";
objMQMessage.replyToQueueName="SampleQueue";
MQPutMessageOptions pmo = new MQPutMessageOptions();
queue.put
queue.put(objMQMessage, pmo);
_________________
Regards ,
VC
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Aug 30, 2007 6:17 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Why a queue manager alias called A? Why not a transmission queue?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
vc1981
PostPosted: Thu Aug 30, 2007 6:36 am    Post subject: Reply with quote

Apprentice

Joined: 18 Jan 2006
Posts: 46

Thanks for the prompt response.

I would just like to elaborate a bit more ..
The synchronous reply messages pass through an an hub and spoke set-up before finally reaching Queue A1 under Queue manager A.

say for eg: message is put in QMGR C it goes to QMGR D then To QMGR B and then Finally it reaches QMGR A

and each of the QMGR's C , D and B have an queue manager alias and Qmgr A has an Local queue.
Could you please advise me as to what is that i am doing wrong out here .
LIke i said ealier do i need to change my java code in such a scenario where by though the messages are put for QMGR A but the application is actually connecting to QMGR C.
_________________
Regards ,
VC
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Aug 30, 2007 6:48 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

If the client is connecting to C then it must specify C in the connection information or you'll get a 2058.

The queue manager alias is a routing construct once the message has been put.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Aug 30, 2007 6:50 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Clients only need to specify a queue manager name if they are using a client connection table.

If they are specifying host/channel/port, it's usually a waste of effort to specify qmgr name. As, among other things, it leaves you open to 2058s that you would otherwise not worry about.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
vc1981
PostPosted: Thu Aug 30, 2007 7:01 am    Post subject: Reply with quote

Apprentice

Joined: 18 Jan 2006
Posts: 46

jefflowrey wrote:
Clients only need to specify a queue manager name if they are using a client connection table.

If they are specifying host/channel/port, it's usually a waste of effort to specify qmgr name. As, among other things, it leaves you open to 2058s that you would otherwise not worry about.


Well if i don't mention the queue manager name then the application will look for the queue A under queue manager C and i would get an 2085.
_________________
Regards ,
VC
Back to top
View user's profile Send private message
vc1981
PostPosted: Thu Aug 30, 2007 7:04 am    Post subject: Reply with quote

Apprentice

Joined: 18 Jan 2006
Posts: 46

Vitor wrote:
If the client is connecting to C then it must specify C in the connection information or you'll get a 2058.

The queue manager alias is a routing construct once the message has been put.


THanks again for the quick response.
Well if i mention the queue manager name C how will mention the message reach actual Queue A1 and queue manager A which has been picked up from the reply to Q and reply to Qmgr field of the request message.
_________________
Regards ,
VC
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Aug 30, 2007 7:06 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There's a difference between mentioning the Queue Manager on the MQCONN and mentioning a different Queue Manager on the MQPUT.

And in the case of an application that is sending replies, you should always be getting and honoring the ReplyToQmgr field from the message, and not anything else.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
vc1981
PostPosted: Thu Aug 30, 2007 8:20 am    Post subject: Reply with quote

Apprentice

Joined: 18 Jan 2006
Posts: 46

jefflowrey wrote:
There's a difference between mentioning the Queue Manager on the MQCONN and mentioning a different Queue Manager on the MQPUT.

And in the case of an application that is sending replies, you should always be getting and honoring the ReplyToQmgr field from the message, and not anything else.


I think get your point Jeff , but then i am not very clear how i can go about this in my java code .. can u shed some light on that as well

Thanks !
_________________
Regards ,
VC
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Aug 30, 2007 8:25 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

In order to become a programmer, rather than merely someone who writes code, you will have to learn how to answer these questions yourself.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 30, 2007 2:41 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

A very polite way of Jeff to point you to the documentation link at the top of the page. Read the Using Java manual....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
vc1981
PostPosted: Thu Aug 30, 2007 7:11 pm    Post subject: Reply with quote

Apprentice

Joined: 18 Jan 2006
Posts: 46

jefflowrey wrote:
In order to become a programmer, rather than merely someone who writes code, you will have to learn how to answer these questions yourself.


You are right ! Guess i was looking for some easy way out !
_________________
Regards ,
VC
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 » 2058 On Queue Manager alias
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.