Author |
Message
|
meetgaurav |
Posted: Tue Nov 25, 2008 2:45 am Post subject: MQ Channel |
|
|
Voyager
Joined: 08 Sep 2008 Posts: 94
|
HI
While binding the Mq Queue, the channel is a required parameter ??. Some time back I seen an article and in that they were not using any chANNEL while binding the Queue. But I tried without channel and is not working.?? please assist me what is the use of Channel and whether it is required or not for bindings
With Channel
define xaqcf(XAQC) qmanager(QMGR) host(202.80.1.20) port(1414) tran(CLIENT) channel(CHANNEL1)
Without Channel
define xaqcf(XAQC) qmanager(QMGR) host(202.80.1.20) port(1414) tran(CLIENT) |
|
Back to top |
|
 |
atheek |
Posted: Tue Nov 25, 2008 2:58 am Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
You don't require a channel when you connect iin bindings mode[tran(bindings) in qcf definition...]
You need a channel if you are connecting in client mode.
These are basics which is covered in using java guide |
|
Back to top |
|
 |
meetgaurav |
Posted: Mon Dec 08, 2008 6:33 am Post subject: |
|
|
Voyager
Joined: 08 Sep 2008 Posts: 94
|
Tryed connecting to Queue Manager without channel..
MQEnvironment.hostname = "1012.23.66";
MQEnvironment.port = 1986;
qMgr = new MQQueueManager("g_qManager");
Am getting:
------------
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
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
java.lang.NullPointerException |
|
Back to top |
|
 |
meetgaurav |
Posted: Mon Dec 08, 2008 6:43 am Post subject: |
|
|
Voyager
Joined: 08 Sep 2008 Posts: 94
|
Whether the channel attribute is mandatory for Java API too... |
|
Back to top |
|
 |
atheek |
Posted: Mon Dec 08, 2008 2:31 pm Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
Both api's java and jms support client and bindings connection. If you want to connect in client mode then you need to specify a channel irrespective of the api you are using. |
|
Back to top |
|
 |
meetgaurav |
Posted: Mon Dec 08, 2008 7:27 pm Post subject: |
|
|
Voyager
Joined: 08 Sep 2008 Posts: 94
|
But in JMS API. I used bindings as
define xaqcf(XAQueueConnectionFactory) qmanager(QMGR) host(131452.232) port(1116) tran(CLIENT)
This above bindings mode without channel is working fine.. |
|
Back to top |
|
 |
atheek |
Posted: Tue Dec 09, 2008 2:48 am Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
Quote: |
define xaqcf(XAQueueConnectionFactory) qmanager(QMGR) host(131452.232) port(1116) tran(CLIENT) |
First of all its a client connection and not bindings..see trans attribute
Its difficult to believe that it 'worked' without channel. What you meant as worked is that you were abe to define this succesfully in jmsadmin without the channel, then it is true. But with this,you will end up with a run time exception. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Dec 09, 2008 4:10 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And remember as you are defining an XAQCF/XATCF that if you use a client connection you also need the etc client jar on the classpath.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
m.krebber |
Posted: Wed Jan 21, 2009 3:05 am Post subject: MQ |
|
|
Newbie
Joined: 21 Jan 2009 Posts: 3
|
could you please specify of what type the channen on MQ should be (server connection,..)? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 21, 2009 3:17 am Post subject: Re: MQ |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
m.krebber wrote: |
could you please specify of what type the channen on MQ should be (server connection,..)? |
If you're using a client, you need a svrconn channel.
If you're binding to the queue manager, you don't need a channel.
The Intercommunication, Client (and Java) documentation will be helpful here  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|