Skip to main content

Foreign JNDI / ExternalContext for Glassfish

No replies


I've read in the weblogic documentation that weblogic supports a feature
called Foreign JNDI:

Similar JBoss supports an ExternalContext:

The feature can be used to bind a JNDI remote context into the local
JNDI tree. I was wondering if some similar feature exists in GlassFish
or if there exists some "standard" way on how to achieve such functionality?

My use case would be that I have a server called front-end that hosts
the web application (.war deployment) and a server called back-end that
hosts the business logic implemented as EJBs (.ear deployment). Now I
can create in the front-end an initial context with the connection
settings to connect to the back-end and use this initial context to
locate my services, but if the name of the back-end server would change
or the IP address or if suddenly the back-end would not be a single
machine, but several in a cluster (e.g. a HA JNDI implementation like then I would have to change
settings in my front-end application. It would be cleaner to just
configure foreign JNDI context to sit at a certain node of the local
JNDI context.

Thanks for any answers or comments,
Christian Schuhegger

To unsubscribe, e-mail:
For additional commands, e-mail: