• 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

Tomcat lookups JBossMQ name

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In my Tomcat(4.1) application, I am trying to create a servlet to lookup a JBossMQ jms name in JBoss 3.2.1. The code is like this:

String icf = "org.jnp.interfaces.NamingContextFactory";
String url="jnp://localhost:1099";
Properties props = new Properties();
props.put( Context.INITIAL_CONTEXT_FACTORY, icf );
props.put( Context.PROVIDER_URL, url );
InitialContext ctx = new InitialContext(props);
System.out.println("got context!");
QueueConnectionFactory qcf = (QueueConnectionFactory)ctx.lookup
("java:/XAConnectionFactory");
System.out.println("found qcf!");
...

But I got an exception: "Name XAConnectionFactory is not bound in this Context".

What's wrong with above code? Or what kinds of jar files do I have to copy to Tomcat lib from Jboss?

Thank for any help!!!

Chris
[ May 02, 2005: Message edited by: chris wang ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic