JBoss Community

Re: finding JMS resources with java:comp/env

created by Wolf-Dieter Fink in JNDI and Naming - View the full discussion

What kind of client? Remote or inside the server? EJB2 or EJB3?

 

Simple Remote access:

TopicConnectionFactory qcf = (TopicConnectionFactory) initialContext.lookup("ConnectionFactory");

TopicConnection conn = qcf.createTopicConnection();

Topic csTopic = (Topic) initialContext.lookup("topic/MyTopic");

 

The env looks like:

env.put("java.naming.factory.initial", "org.jboss.naming.NamingContextFactory");

env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");

env.put("java.naming.provider.url", "jnp://localhost:1099");

Reply to this message by going to Community

Start a new discussion in JNDI and Naming at Community