Thank you for reply.
I got running a example in whcih I created a servlet in Tomcat and sent a JMS message to OpenJMS server. I put 4 OpenJMS jar files into $TOMCAT_HOME$/shared/lib and use following code to set up Context:
String icf = "org.exolab.jms.jndi.rmi.RmiJndiInitialContextFactory";
String url="rmi://localhost:1099/";
Hashtable env = new Hashtable();
env.put( Context.INITIAL_CONTEXT_FACTORY, icf );
env.put( Context.PROVIDER_URL, url );
Context ctx = new InitialContext(env);
It works fine.
But when I use the same way to connect JBossMQ I got an exception:
Name XAConnectionFactory is not bound in this Context.
My code looks like this:
String icf = "org.jnp.interfaces.NamingContextFactory";
String url="jnp://localhost:1099";
Hashtable env = new Hashtable();
env.put( Context.INITIAL_CONTEXT_FACTORY, icf );
env.put( Context.PROVIDER_URL, url );
Context ctx = new InitialContext(env);
QueueConnectionFactory qcf = (QueueConnectionFactory)ctx.lookup
("java:/XAConnectionFactory");
...
What's wrong with my code? or did i miss some jar files?