users@glassfish.java.net

Get JMS resources from different GF-Server (external JNDI?)

From: <glassfish_at_javadesktop.org>
Date: Thu, 08 Apr 2010 09:23:35 PDT

Hi folks,

the following problem kept me busy for the last two days:

I created a ConnectionFactory and a JMSQueue as Glassfish resources on host 'A'. Now I need to access these resources from another host 'B' using JNDI-lookup. This works fine if a run a standalone application on B which creates an initial context using

InitialContext itx = new InitialContext(jndiProperties);

where "jndiProperties" refer to the JNDI service on host A. However, if I use the same code within a servlet on host B, I always end up with an InitialContext that refers to the JNDI tree of the local host (i.e. host B).

I have read, that another way for JNDI-Lookup on a remote JNDI repository is via external JNDI resources. Unfortunately none of the articles I have read about that topic provides sufficient information about how I should set up such an extgernal resource for my given case - i.e. what values need to be specified for:

- JNDI Name
- Factory Class
- JNDI Lookup

?

Any hints would be appreciated - thanks.
[Message sent by forum member 'herck9']

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