users@glassfish.java.net

Separate JNDI per instance?

From: <forums_at_java.net>
Date: Wed, 28 Sep 2011 11:19:24 -0500 (CDT)

 Hi,

    I understand Glassfish uses a common JNDI across the domain (as defined
by a management/admin domain DAS) and therefore shared across all clusters
and instances within that admin domain.

Is this understanding correct? if so, are there any plans to change this?

I have a situation whereby i wish to deploy and manage (i.e. upgrade etc.) a
single application for multiple clients - the application pulls things like
DB connection details from the JNDI and uses EJB dependancy injection for all
applicable resources. Ideally each instance would have a different DB within
the JNDI. This looks like it could be possible as each instance seems to run
in it's own JVM, however the shared JNDI means it cannot work.

Normally I could use an extenal properties file, however I am using Hibernate
and it's entity manager which looks/expects the persistence XML to be within
the package.

It feels like it should be possible? and I really don't want to produce
multiple builds as that would be completley unscalable/supportable. I could
also acheive this with seperate domains - but it really fits a common domain
pattern with a single management console to manage all instances (they are of
course the same instance of the application, just running with different
values for the JNDI).

Has anyone experienced and solved this or a similiar problem?

 


--
[Message sent by forum member 'seclarke']
View Post: http://forums.java.net/node/848220