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 & BlockIP2

Post new topic  Reply to topic
 JMS & BlockIP2 « View previous topic :: View next topic » 
Author Message
SixBlade
PostPosted: Tue Dec 06, 2005 7:41 am    Post subject: JMS & BlockIP2 Reply with quote

Apprentice

Joined: 03 Dec 2003
Posts: 26
Location: UK

Hi,

I'm currently facing a problem with BlockIP2. I basically need to figure out how to, from the MQ JMS api, set the correct user id, the one that will show in a server side security exit as PMQCD.RemoteUserIdentifier. For Base MQ classes, this is MQEnvironment.userID according to docs and my test, but I have to use JMS classes, and I cannot find the correct approach. Anyone who has done this or have managed to find docs for it etc?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Dec 06, 2005 7:57 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The JMS send method sets the user ID.

There's a lot of topics about JMS and user ID's here. A quick review would probably be very helpful to you.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
SixBlade
PostPosted: Tue Dec 06, 2005 8:12 am    Post subject: Reply with quote

Apprentice

Joined: 03 Dec 2003
Posts: 26
Location: UK

Sorry for the very unclear problem description: it is during connect I get problems, since the user id isn't supplied according to MQ. I don't get as far as "put" in other words. For this specific topic I haven't been able to google or search here either. Anyway, just happened to find the solution. For the JMS classes, you can still use MQEnvironment.userID, if you're using the version 5.3 classes (at least 5.3 and csd 9). But in version 6, it won't work (as far as I remember, there is a new sec structure for version 6 instead).
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Dec 06, 2005 8:14 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

How are you creating your queue connection factory?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
SixBlade
PostPosted: Tue Dec 06, 2005 8:23 am    Post subject: Reply with quote

Apprentice

Joined: 03 Dec 2003
Posts: 26
Location: UK

Don't know if this question still needs an answer, but this is basically what I set on the conn factory:


Code:
      myQueueConnectionFactory.setHostName( host );
         myQueueConnectionFactory.setPort( port );
         myQueueConnectionFactory.setChannel( channel );
         myQueueConnectionFactory.setQueueManager( qmgrName );
         MQEnvironment.userID = userId;
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 06, 2005 9:28 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

SixBlade wrote:
Don't know if this question still needs an answer, but this is basically what I set on the conn factory:


Code:
      myQueueConnectionFactory.setHostName( host );
         myQueueConnectionFactory.setPort( port );
         myQueueConnectionFactory.setChannel( channel );
         myQueueConnectionFactory.setQueueManager( qmgrName );
         MQEnvironment.userID = userId;


You are mixing JMS and base java.

To set the user id in JMS you open the connection passing the userid and passwd:
Code:
QueueConnection con=myQueueConnectionFactory.createQueueConnection(userid, passwd);


Remember that depending on the version / security exit the passwd might not get checked but the user certainly does if not blank.

Enjoy
Back to top
View user's profile Send private message Send e-mail
SixBlade
PostPosted: Wed Dec 07, 2005 1:02 am    Post subject: Reply with quote

Apprentice

Joined: 03 Dec 2003
Posts: 26
Location: UK

Thanks, that's the piece of code I didn't manage to find in the manuals for some reason. Know I was mixing JMS and base java api, it happened to work but didn't feel great so to speak. May I ask where you found that piece of information...? Java JMS spec, MQ using java guide, security guide....?

Thanks anyway!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 07, 2005 11:43 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

MQ Using Java guide & JMS spec
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS & BlockIP2
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.