• 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

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 =
(javax.jms.QueueConnectionFactory)env.lookup("myQCF");
//create a connection
javax.jms.QueueConnection qc =qcf.createQueueConnection();
//create a session
javax.jms.QueueSession qSession =
qc.createQueueSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
//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!"));
sender.close();

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
interesting..
Letus take the big hammer, enable trace and
post your trace here.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic