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 Installation/Configuration Support » java and Visual basic clients. 2035 with VB, ok with Java.

Post new topic  Reply to topic
 java and Visual basic clients. 2035 with VB, ok with Java. « View previous topic :: View next topic » 
Author Message
jeremy
PostPosted: Thu Nov 27, 2003 3:10 am    Post subject: java and Visual basic clients. 2035 with VB, ok with Java. Reply with quote

Newbie

Joined: 26 Nov 2003
Posts: 2

Hi,
I'm writing a simple VB gui to put and take messages of a queue hosted on a remote queue manager (unix); I also have a simple command line version written in Java. The thing is the Java version works OK, but I get a 2035 error with the VB client.

I connect to the QM in java as follows:

MQEnvironment.hostname = hostName;
MQEnvironment.channel = "SYSTEM.DEF.SVRCONN";
MQEnvironment.port = port;
qMgr = new MQQueueManager( manager );

and all is fine....

in VB I ....

Dim CNOCD As MQCNOCD
MQCNOCD_DEFAULTS CNOCD
CNOCD.ChannelDef.ConnectionName = hostname & "(" & port & ")"
CNOCD.ChannelDef.channelName = "SYSTEM.DEF.SVRCONN"
CNOCD.ChannelDef.TransportType = MQXPT_TCP

MQCONNXAny queueManagerName, CNOCD, Hconn, CompCode, ConnReason

and I get a 2035 when I hit MQCONNXAny. So, I guess, my questions are:

1. What is the difference between the java client and the VB client?

2. Is java embedding a guid/uid during the connect ?

3. How do I get the VB client to emulate the java client ?

cheers,
Jeremy
Back to top
View user's profile Send private message
leongor
PostPosted: Thu Nov 27, 2003 4:43 am    Post subject: Reply with quote

Master

Joined: 13 May 2002
Posts: 264
Location: Israel

RC 2035 is MQRC_NOT_AUTHORIZED, so VB client works correctly.
It's known security hole in java client. If you don't set MQEnvironment.userID it takes mq admin user instead.
Just use authorized user or set MCAUSER of SYSTEM.DEF.SVRCONN to one.
_________________
Regards.
Leonid.

IBM Certified MQSeries Specialist.
Back to top
View user's profile Send private message
jeremy
PostPosted: Thu Nov 27, 2003 5:47 am    Post subject: Reply with quote

Newbie

Joined: 26 Nov 2003
Posts: 2

Hi,
thanks for the reply; so I see I have two options (although I'm thinking only one is OK!)

1. Add the MCAUser at the client before calling connect, as follows:

CNOCD.ChannelDef.MCAUserIdentifier = "AUTHUSER"

2. Set the MCAUSER in the actual channel definition, at the server host, as follows:

DEFINE CHANNEL ('MY.CHANN') CHLTYPE(SVRCONN) +
....
MCAUSER('AUTHUSER') +
...

In case 1. above, I'm trying to get onto a channel with :
MCAUSER(' ')

Cheers,
Jeremy
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 Installation/Configuration Support » java and Visual basic clients. 2035 with VB, ok with Java.
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.