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 » General Discussion » Is channel name required?

Post new topic  Reply to topic
 Is channel name required? « View previous topic :: View next topic » 
Author Message
Vishy
PostPosted: Sat Oct 04, 2003 7:59 pm    Post subject: Is channel name required? Reply with quote

Novice

Joined: 30 Jul 2003
Posts: 21

Hi

My code runs fine in client connection when I specify channelname. SYSTEM.DEF.SVRCONN.

If I try to run the code with out specifying channel it fails at runtime with the following error. (Is this called bindings mode?). Do we need to specify the channelname if the code runs on the server side where MQ is setup?

Closure reason = 2009
MQJE001: Completion Code 2, Reason 2009

When does channel name required to be specified. Any kind of information on this will be of great help.

Thanks
Vishy
Back to top
View user's profile Send private message Yahoo Messenger
mqonnet
PostPosted: Mon Oct 06, 2003 5:08 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

When you are running a client, you need to give the client some basic params that guide it to the Queue manager on the server. Now if you miss out any one of them, then you are bound to not get a connection. Hence you must specify the channel name either in the form of channel name in your app, or in the channel def table or MQSERVER environment variable.

When you run the same app on the server there are a couple of things to consider. 1) You MUST recompile this app with the server libraries. 2) You DO NOT need the channel name. As you are local to the server and connecting from there itself.

You get 2009 for many reasons. But more or less all lead to the same place and which is connection broken or rather a connection was not esatblished. In your case its the latter, since you did not specify the channel name.

Hope this helps...

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Vishy
PostPosted: Mon Oct 06, 2003 6:45 am    Post subject: Reply with quote

Novice

Joined: 30 Jul 2003
Posts: 21

Kumar, Thanks for the information. What are server libraries? I am compiling the class and doing ftp to server side. I do not want to make use of channel name or hostname or port# becoz, the compiled class is on the same box where MQ is installed. How to get the connection set if I dont specify the channel name?

Regards
Vishy
Back to top
View user's profile Send private message Yahoo Messenger
vennela
PostPosted: Mon Oct 06, 2003 6:47 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

If you are using java then don't worry about server libraries.

In your java app comment the following three lines and this will make your program connect to the Queue Manager in bindings mode instead of client mode.

Code:

MQEnvironment.channel = "SYSTEM.DEF.SVRCONN";
MQEnvironment.hostname = "somehost";
MQEnvironment.port = 9050;


-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Vishy
PostPosted: Mon Oct 06, 2003 9:03 am    Post subject: java.lang.UnsatisfiedLinkError:no mqjbnd05 in java.library. Reply with quote

Novice

Joined: 30 Jul 2003
Posts: 21

Venny, as u said I commented and that exception is gone but I am getting the following error.
I made sure that jta.jar and the mqjbndo5.sl are in path. what is java.library.path

:/opt/mqm/java/lib/connector.jar:/opt/mqm/samp/java/base:/opt/mqm/java/lib/jt
:/opt/mqm/java/lib/libmqjbnd05.sl:/opt/mqm/java/lib/libmqjbdf02.sl:


Exception in thread "main" java.lang.UnsatisfiedLinkError: no mqjbnd05 in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.ibm.mq.server.MQSESSION$1.run(MQSESSION.java:184)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.mq.server.MQSESSION.<clinit>(MQSESSION.java:180)
at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:67)
at com.ibm.mq.MQSESSION.getSession(MQSESSION.java:358)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:150)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:139)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:157)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnect
ionManager.java:150)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:678)
Back to top
View user's profile Send private message Yahoo Messenger
vennela
PostPosted: Mon Oct 06, 2003 9:31 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

What platform are you running MQ on. You need to set an environment variable. In Using Java MQ manual, chapter2, under Environment Variables there is a list of variables to be set based on the platform.

-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Is channel name required?
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.