users@glassfish.java.net

Re: JMS and Glassfish Remote Connection

From: <glassfish_at_javadesktop.org>
Date: Thu, 10 Jul 2008 21:14:43 PDT

You're on the right track with the

        public static Context getIntialContext()

method

I believe there are two problems you need to deal with:

1 - provider URL is the JNDI provider URL -
env.put("java.naming.provider.url", "mq://10.30.16.29:4693/");

this needs to be more like
properties.put(Context.PROVIDER_URL,"iiop://10.30.16.29:4693");


2 - Coming to JNDI from the outside (a different, possibly remote JVM) is a bit like hoping to walk into a bank-vault through an open door. You need to provide credentials of some sort to be allowed to get at that JNDI instance.

I connect to my JNDI and JMS setup from Hermes (http://hermesjms.com), and I use 2 extra properties - securityPrincipal and securityCredentials (username and password).
[Message sent by forum member 'primeq' (primeq)]

http://forums.java.net/jive/thread.jspa?messageID=285870