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 ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • 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 =
(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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic