• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMS on WAS 6.0 to MQ

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2035
at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:2858)
at com.ibm.mq.jms.MQQueueServices.getOutputQueue(MQQueueServices.java:347)
at com.ibm.mq.jms.JMSServicesMgr.getOutputQueue(JMSServicesMgr.java:137)
at com.ibm.mq.jms.MQSession.createQSender(MQSession.java:6187)

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 JMSAdmin.config.ws:
INITIAL_CONTEXT_FACTORY=com.ibm.ejs.ns.jndi.CNInitialContextFactory
PROVIDER_URL=iiop://localhost:31000/
SECURITY_AUTHENTICATION=none

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();
connection.start();
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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic