users@glassfish.java.net

Re: Separate JNDI per instance?

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Thu, 29 Sep 2011 11:24:53 +0530

Although the JPA spec has provided options for a container to override
things like jta-data-source name while calling
PersistenceProvider.createContainerEMF, GlassFish does not currently
leverage it. File an RFE. Currently your option is to directly call
Persistence.createEntityManagerFactory and pass different values in the
Map parameter. You have to take care of things like transaction
management and life cycle of entity managers explicitly in your EJB with
this approach.

Sahoo
On Thursday 29 September 2011 02:30 AM, forums_at_java.net wrote:
>
> If I could work around it if i could externalise the hibernate
> persistence
> XML file - thereby each instance of the application would use a different
> config which would point to a different DB - thats doesn't appear
> possible so
> both options seems not to work.
>
> Does that make more sense?
>
>
> --
>
> [Message sent by forum member 'seclarke']
>
> View Post: http://forums.java.net/node/848220
>
>