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 » JMS to put message on remote queue

Post new topic  Reply to topic Goto page 1, 2  Next
 JMS to put message on remote queue « View previous topic :: View next topic » 
Author Message
pras
PostPosted: Sat Jun 20, 2009 3:36 am    Post subject: JMS to put message on remote queue Reply with quote

Newbie

Joined: 08 Jun 2009
Posts: 9

Hi,
I have configured websphere with Queue connection factory which uses MQ provider.
My application needs to send message on MQ queue defined on its queue manager as a remote queue.

I get this error:
[6/20/09 15:39:54:074 IST] 00000037 ConnectionEve A J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adapter for resource jms/QCF01. The exception which was received is javax.jms.JMSException: MQJMS2008: failed to open MQ queue.


Any one has seen thsi before.
What is correct way to send message on remote queue.

Thanks.
Back to top
View user's profile Send private message
atheek
PostPosted: Sat Jun 20, 2009 6:16 am    Post subject: Reply with quote

Partisan

Joined: 01 Jun 2006
Posts: 327
Location: Sydney

Capture the linked exception to get the MQ Reason Code. Without the reason code it is hard to guess what is your issue.

Example code to extract linked exception:
http://www.mqseries.net/phpBB2/viewtopic.php?t=42149
Back to top
View user's profile Send private message
pras
PostPosted: Sat Jun 20, 2009 6:55 am    Post subject: Reply with quote

Newbie

Joined: 08 Jun 2009
Posts: 9

I am getting 2085 reason code.

Linked exception = com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2085
at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:2808)
Back to top
View user's profile Send private message
atheek
PostPosted: Sat Jun 20, 2009 12:17 pm    Post subject: Reply with quote

Partisan

Joined: 01 Jun 2006
Posts: 327
Location: Sydney

mqrc 2085

2085 0x00000825 MQRC_UNKNOWN_OBJECT_NAME

Check if you are specifying an existing MQ queue name.
Back to top
View user's profile Send private message
pras
PostPosted: Sat Jun 20, 2009 8:42 pm    Post subject: Reply with quote

Newbie

Joined: 08 Jun 2009
Posts: 9

Yes, the queue is defined as remote queue in the queue manager i am connecting. It is present also.
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Jun 21, 2009 1:12 am    Post subject: Reply with quote

Grand High Poobah

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

pras wrote:
Yes, the queue is defined as remote queue in the queue manager i am connecting. It is present also.


Eliminating the obvious, it does have the same name in the same combination of case as the queue you're attempting to connect to doesn't it?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pras
PostPosted: Sun Jun 21, 2009 4:51 am    Post subject: Reply with quote

Newbie

Joined: 08 Jun 2009
Posts: 9

I didn't get you. I told that I am connecting to a queue manager say QM1. This queue manager hosts a queue defined as remote queue say QR1. Remote queue here means a queue which points to a queue say QL2 present in another queue manager say QM2.
I am connecting to queue manager QM1 and trying to put a message on this queue QR1.

So, question is what combination I shld use to send message.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sun Jun 21, 2009 7:48 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Are you trying to put to the queue 'qr1' when the Queue Manager has a remote queue named 'QR1'?

Are you trying to put to a QREMOTE named 'QR1'? or a QCLUSTER named 'QR1'?

Are you specifying a Queue Manager name when you are doing a PUT? Are you sure?
Back to top
View user's profile Send private message
pras
PostPosted: Sun Jun 21, 2009 11:24 pm    Post subject: Reply with quote

Newbie

Joined: 08 Jun 2009
Posts: 9

Are you trying to put to the queue 'qr1' when the Queue Manager has a remote queue named 'QR1'?
- I am using QR1 all name sare in upper case.

Are you trying to put to a QREMOTE named 'QR1'? or a QCLUSTER named 'QR1'?
- yes i am puuting to QREMOTE QR1 and its not clustered queue.

Are you specifying a Queue Manager name when you are doing a PUT? Are you sure?
- I have queue connection factory configured in webspehere app server. There queue mgr, port and server channel are specified. I can connect to local queues using this setup very well.
Back to top
View user's profile Send private message
zpat
PostPosted: Sun Jun 21, 2009 11:33 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

List the definitions of your QM1's remote quote, and xmit queue to QM2.

Probably the xmit queue is missing or has the wrong name.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Mon Jun 22, 2009 1:38 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

Does a test message work (eg when using rfhutil / mqexplorer)?
Back to top
View user's profile Send private message
pras
PostPosted: Mon Jun 22, 2009 4:03 am    Post subject: Reply with quote

Newbie

Joined: 08 Jun 2009
Posts: 9

I have tested using amqsput QR1 QM1.
It is working.
xmit queue is there tahts why amqsput works. Message is received on remote queue manager also.
I have doubt that it is something to do with JMS API. Do I have to mention any paranmeter?



Log file also gives reason code as:
2045 (X'07FD')MQRC_OPTION_NOT_VALID_FOR_TYPE
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Mon Jun 22, 2009 4:39 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

Sounds like your making progress. Check your open options (eg not opening the QRemote for input) eg.....

http://www.mqseries.net/phpBB2/viewtopic.php?p=125882&sid=62d37177548e12ef2812ef0254f9d1d8
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Jun 22, 2009 6:43 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

I have seen examples of poor code (probably found in bad examples) where queues are opened both for input and output.

This is a bad practice (unless you are actually doing both MQGET and MQPUT to the same queue), one of the reasons is that opening a remote queue for input won't work. Another reason is that it requires more access rights than actually needed.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Mon Jun 22, 2009 7:40 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

zpat wrote:
Another reason is that it requires more access rights than actually needed.


Wont that be a 2035?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS to put message on remote queue
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.