Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS on WAS 6.0 to MQ  RSS feed

Mike Sever
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to run a testing jsp file for JMS (without MDB) on WAS 6.0. I've done below configuration but there is such a exception when calling QueueSession's createSender method:
javax.jms.JMSSecurityException: MQJMS2008: failed to open MQ queue MQJE001: Completion Code 2, Reason 2035

Configuration as below:
WAS console->Resources->JMS Providers->Websphere MQ
1. create a queue connection factory in "WebSphere MQ queue connection factories":
input "Name"(MyFactory), "JNDI name"(test/MyFactory), set none in "Component-managed authentication alias", "Container-managed authentication alias" and "Mapping-configuration alias"(but the last one will be reset to "DefaultPrincipal Mapping" after saving, don't know whether it does matter), set "Transport type" as "BINDINGS", and Queue manager(maybe required).

2. create a queue destination in "WebSphere MQ queue destinations":
input "Name"(MyQueue), "JNDI name"(test/MyQueue), "Base queue name", "Base queue manager name"(maybe required), keep default setting "APPLICATION_DEFINED".

3. JMSAdmin

define q(MyQueue) queue(local_queue_name) qmanager(qm_name)
define qcf(MyFactory) qmanager(qm_name)

ps: "MyFactory" is defined in step 1 as "Name", "MyQueue" is defined in step 2 as "Name".

4. jsp:
QueueConnectionFactory factory = (QueueConnectionFactory)context.lookup("test/MyFactory");//lookup ok
QueueConnection connection = factory.createQueueConnection();
Queue queue = (Queue)context.lookup("test/MyQueue");//lookup ok
QueueSession qsession = connection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
QueueSender queueSender= qsession.createSender(queue);//exception here

Is there any other step required? Thanks for reply!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!