-
1. Re: finding JMS resources with java:comp/env
wdfink Sep 15, 2011 2:40 AM (in response to smalejandro)What kind of client? Remote or inside the server? EJB2 or EJB3?
Simple Remote access my example is JBoss 5.1:
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");
-
2. Re: finding JMS resources with java:comp/env
smalejandro Sep 16, 2011 3:33 PM (in response to wdfink)Hi, thanks for your reply.
I tell you that I have removed the line: ctx = (Context)ctx.lookup("java:comp/env"), of this way whether i can find the TopicConnectionFactory.
But I have that doubt, why doesn't it works using java:comp/env?.
Thanks.