This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
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

Configuring MQSeries in WAS4.0

Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i have a problem in configuring MQSeries,i have followed the steps given in the handbook properly,the code which i have written is also the same as given by the HandBook,now the problem is it is not able to get the JNDI reference "java:com/env",frankly speaking i myself dont understand where this has been created.
I tried to create a resource reference thro the aat for the web module while creating an application.Still not able to solve the probs.
Plz help me asap.
Sample Code:

Very Urgent plz reply.If possible give a new solution.

//get JNDI context
javax.naming.InitialContext ctx =new javax.naming.InitialContext();
//get local JNDI environment
javax.naming.Context env =
(javax.naming.Context)ctx.lookup("java:comp/env");ഊ//get queue connection factory
javax.jms.QueueConnectionFactory qcf =
//create a connection
javax.jms.QueueConnection qc =qcf.createQueueConnection();
//create a session
javax.jms.QueueSession qSession =
//get queue
javax.jms.Queue q =(javax.jms.Queue)env.lookup("myQ");
//create a queue sender for the queue and send a text message
javax.jms.QueueSender sender =qSession.createSender(q);
sender.send(qSession.createTextMessage("Hello world!"));

Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Letus take the big hammer, enable trace and
post your trace here.
    Bookmark Topic Watch Topic
  • New Topic