Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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 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!
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic