Author |
Message
|
InQueue |
Posted: Fri Nov 18, 2005 1:04 am Post subject: Getting connected to WebSphere MQ-Urgent Help plz... |
|
|
Newbie
Joined: 18 Nov 2005 Posts: 2
|
Hi,
I have used WebSpehere MQ Explorer for Windows to create a local queue manager and a set of local queues and I am trying to access the same form the piece of code below..
MQEnvironment.hostname="<system name>";
MQEnvironment.channel="";
MQEnvironment.port=1414;
//Connecting to the queue manager
MQQueueManager objQMgr = new MQQueueManager("XZ0Z004E"); ----------------Error thrown at this line
It throws the below exception………..
MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
MQJE001: Completion Code 2, Reason 2009
exception is caaught
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:
172)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnecti
on(MQClientManagedConnectionFactoryJ11.java:270)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnectio
n(MQClientManagedConnectionFactoryJ11.java:290)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.jav
a:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConne
ctionManager.java:150)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.jav
a:682)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:620)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:393)
at q2q.<init>(q2q.java:35)
at q2q.main(q2q.java:9)
Also,JMS postcard doesn't work...
Any help will be welcome…
Regards
InQueue |
|
Back to top |
|
 |
wschutz |
Posted: Fri Nov 18, 2005 2:28 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
i guess we'll have to start with this:
Quote: |
MQEnvironment.channel=""; |
Are you really NOT specifying a channel name? _________________ -wayne |
|
Back to top |
|
 |
EddieA |
Posted: Fri Nov 18, 2005 9:07 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
And the (tiny) Seach button above will provide some amazing results if you try it, with "2009".
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
PankajS |
Posted: Sat Nov 19, 2005 5:53 am Post subject: |
|
|
Voyager
Joined: 27 Dec 2004 Posts: 82
|
i think either u should put some channel name(may be system SRVCONN) in the MQEnvironment.channel or U can skip it (if u are expecting fast path binding to Q manager).In this case it is searching for a channel ""...which u may not have defined.........  |
|
Back to top |
|
 |
wschutz |
Posted: Sat Nov 19, 2005 6:28 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
PankajS wrote: |
i think either u should put some channel name(may be system SRVCONN) in the MQEnvironment.channel or U can skip it (if u are expecting fast path binding to Q manager).In this case it is searching for a channel ""...which u may not have defined.........  |
Did you mean "SYSTEM.DEF.SVRCONN"?
Also, fastpath bindings are probably not exactly what you meant to say. You meant to say "server bindings". Fastpath bindings are a specifi type of server bindings that shouldn't be used without good cause.  _________________ -wayne |
|
Back to top |
|
 |
InQueue |
Posted: Mon Nov 21, 2005 12:10 am Post subject: Reg. Conf. QM/Queues on WebSphere Admin Console v5 |
|
|
Newbie
Joined: 18 Nov 2005 Posts: 2
|
Hi,
thanx for the response.The fact is the problem got resolved when i left the hostname blank.I guess it took the local host as the default one and connected to the local QM defined.
Configuring the same on the Websphere Adminsitrative Console v5 is creating problems.It doesn't seem to identify the QM defined and gives the error msg as
WMSG0307E:Unable to connect to the Queue Manager
I have configured the queues under the WebSphere MQ JMS providers->WebSphere Queue Destinations->"<Queue Name> ".The channel name is left balnk and default port is used.Connection Factory Settings are also defined properly.
How do i resolve this?
Regards
InQueue
"Always borrow money from a pessimist. He won't expect it back. " |
|
Back to top |
|
 |
PankajS |
Posted: Mon Nov 21, 2005 2:05 am Post subject: |
|
|
Voyager
Joined: 27 Dec 2004 Posts: 82
|
Hi wschutz,
Yes, I ment the server connection only.
I think,Now,InQueue could connect,because if u do not specify the MQEnvironment.hostname,MQ considers this server binding to be fast path .....and so u need not to specify any channel name in the MQEnvironment.channel (it can even accept blank ) .........
So now INQUEUE is connected in FASTPATH binding .......correct if If am wrong .... |
|
Back to top |
|
 |
wschutz |
Posted: Mon Nov 21, 2005 2:46 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Inqueue: are you using the MQ JMS classes or the MQ Base classes?
This is a MQ base class:
Quote: |
MQQueueManager objQMgr = new MQQueueManager("XZ0Z004E"); |
Yet, you talk about
Quote: |
I have configured the queues under the WebSphere MQ JMS providers->WebSphere Queue Destinations->"<Queue Name> ".The channel name is left balnk and default port is used.Connection Factory Settings are also defined properly. |
PankajS: please search for FASPATH in the InfoCenter and read up on what it means. _________________ -wayne |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 21, 2005 11:52 am Post subject: Re: Reg. Conf. QM/Queues on WebSphere Admin Console v5 |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
InQueue wrote: |
Hi,
thanx for the response.The fact is the problem got resolved when i left the hostname blank.I guess it took the local host as the default one and connected to the local QM defined.
Configuring the same on the Websphere Adminsitrative Console v5 is creating problems.It doesn't seem to identify the QM defined and gives the error msg as
WMSG0307E:Unable to connect to the Queue Manager
I have configured the queues under the WebSphere MQ JMS providers->WebSphere Queue Destinations->"<Queue Name> ".The channel name is left balnk and default port is used.Connection Factory Settings are also defined properly.
How do i resolve this?
Regards
InQueue
"Always borrow money from a pessimist. He won't expect it back. " |
You have to determine whether you want a local connection or bindings connection or a client connection.
For a bindings connection all you need is the qmgr name and set the connection attributes to MQ_Bindings.
For a client connection you will need following:
Set transport attribute to <TCP_MQ_Client>
hostname = <hostname on the net or dns name of host or ip>
channel =<this HAS to be a svrconn type channel>
port number = <default is 1414 but you have to set it to the port your MQlistener is listening on>
Qmgrname < with client bindings this is optional as uniquely defined by the 3 other parameters>
Enjoy  |
|
Back to top |
|
 |
|