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 » Need sample code to connect to MQ using JMS.

Post new topic  Reply to topic
 Need sample code to connect to MQ using JMS. « View previous topic :: View next topic » 
Author Message
karthikravi
PostPosted: Tue Jul 05, 2005 6:02 am    Post subject: Need sample code to connect to MQ using JMS. Reply with quote

Newbie

Joined: 30 Jun 2005
Posts: 8

Hi,

I'm very new to MDB and MQ. I need sample code with configurations on how to pickup messages from MQ using MDB and JMS. Thanks in advance.

I'm using RAD 6 and MQ series 6.

Thanks,
Karthik.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jul 05, 2005 6:05 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Have you used the Search button here to find "Sample Code"?

Have you tried using Google, and entering in "WebSphere MQ" +JMS +MDB +sample?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
karthikravi
PostPosted: Tue Jul 05, 2005 6:23 am    Post subject: Reply with quote

Newbie

Joined: 30 Jun 2005
Posts: 8

Googling didn't help. Can anyone provide me with some sample code.

This exception occurs even when i have set the
prop.put("SECURITY_AUTHENTICATION", "NONE");

javax.naming.NamingException: Unable to connect to the admin queue. Exception was: javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager. Root exception is javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager

Any idea????

Regards,
Karthik.
Back to top
View user's profile Send private message
sebastianhirt
PostPosted: Tue Jul 05, 2005 6:47 am    Post subject: Reply with quote

Yatiri

Joined: 07 Jun 2004
Posts: 620
Location: Germany

karthikravi wrote:
Googling didn't help. Can anyone provide me with some sample code.


http://www.google.de/search?hl=de&q=jms+%2Bmdb+%2Bmq+%2Bsample&meta=

http://dev.bea.com/codelibrary/code/sample_mdb.jsp

and many more...

Quote:
MQJMS2013: invalid security authentication supplied for MQQueueManager


Well, my very limited Java skills suggest me that it might be that the user that is running your programm is not permited to access the queue manager. But I am not really sure.

There is a lot of samples on the IBM homepage. Maybe you want to make you familiar with them. Also there is some java samples available on this site, in the repository sectioni.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jul 05, 2005 10:51 am    Post subject: Reply with quote

Grand High Poobah

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

Check out the Red Books from IBM. The new one about WAS 6.0 has the explanation on how to hook up WAS MDB to a queue in the Enterprise Service Bus (ESB).
If you do not use embedded MQ you will set it up as in WAS 5.x. But both setups are documented in the pdf with screenshots....

It talks as well about the JAAS setup....

Enjoy
Back to top
View user's profile Send private message Send e-mail
StigV
PostPosted: Sun Aug 14, 2005 3:01 pm    Post subject: Re: Need sample code to connect to MQ using JMS. Reply with quote

Newbie

Joined: 13 Aug 2005
Posts: 1
Location: Denmark

Hello,

>javax.jms.JMSSecurityException: MQJMS2013: invalid security
>authentication supplied for MQQueueManager

is not related to JAAS in my humble opinion - but is an issue about providing proper authentication credentials for the MQ support classes in com.ibm.mqjms.jar

Set correct "user.name" in the environment and off you go... But beware a security manager

Walk-through step-by-step described fully in articles on

http://www.topsecurity.dk

DISCLAIMER: I apologize for any misleading answers I might have made.

regards

StigV/www.cryptography.dk
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
fjb_saper
PostPosted: Sun Aug 14, 2005 3:22 pm    Post subject: Re: Need sample code to connect to MQ using JMS. Reply with quote

Grand High Poobah

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

StigV wrote:
Hello,

>javax.jms.JMSSecurityException: MQJMS2013: invalid security
>authentication supplied for MQQueueManager

is not related to JAAS in my humble opinion - but is an issue about providing proper authentication credentials for the MQ support classes in com.ibm.mqjms.jar

Set correct "user.name" in the environment and off you go... But beware a security manager

Walk-through step-by-step described fully in articles on

http://www.topsecurity.dk

DISCLAIMER: I apologize for any misleading answers I might have made.

regards

StigV/www.cryptography.dk


And what if you please is JAAS if not Java Authentication and Authorization Service??
This is the standard way to use in WAS to pass credentials through the container that are different from the user running WAS...
The setup is done in the JAAS and JNDI configuration of WAS ...
all you define is an alias (with username and password) for the container to use when contacting MQ.

What you need to do is make sure that the user behind the alias is either part of the mqm group or has proper authorization on MQ (see MQ Admin manual)

Enjoy
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 » Need sample code to connect to MQ using JMS.
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.