Author |
Message
|
karthikravi |
Posted: Tue Jul 05, 2005 6:02 am Post subject: Need sample code to connect to MQ using JMS. |
|
|
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 |
|
 |
jefflowrey |
Posted: Tue Jul 05, 2005 6:05 am Post subject: |
|
|
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 |
|
 |
karthikravi |
Posted: Tue Jul 05, 2005 6:23 am Post subject: |
|
|
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 |
|
 |
sebastianhirt |
Posted: Tue Jul 05, 2005 6:47 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Jul 05, 2005 10:51 am Post subject: |
|
|
 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 |
|
 |
StigV |
Posted: Sun Aug 14, 2005 3:01 pm Post subject: Re: Need sample code to connect to MQ using JMS. |
|
|
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 |
|
 |
fjb_saper |
Posted: Sun Aug 14, 2005 3:22 pm Post subject: Re: Need sample code to connect to MQ using JMS. |
|
|
 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 |
|
 |
|