persistence@glassfish.java.net

multiple databases

From: Alessandro Pedrotti <alessandrop_at_anthesi.it>
Date: Tue, 20 Nov 2007 16:15:48 +0100

Any suggestion to this scenario

DEVELOPMENT PLATFORM:

1 development database

PRODUCTION ENVIRORMENT 1

customer database 1
customer database 2
customer database 3

PRODUCTION ENVIRORMENT 2

customer database 4
customer database 5


how can i use persistencein ejbs in such envirorment? the persistence
api cannot let me dynamically inject EntityManager.
In a normal j2ee application i connect to database dynamically making a
jndi lookup of the jdbc connection through normal jndi lookup, staring
from the database jndi name.

While the connection pool can be deployed outside the application
(outside the .ear, it's only glassfish config), the persistence
framework narrow me to have one ear that must fit the various
persistence.xml units that points to each production database

I've tried all the methods from documentation, but no workaround found
for this trouble.

Any suggestion?

ANYONE THAT SHARE THE SAME PROBLEM? I THINK THIS IS A TROUBLE OF ALL
J2EE IN-SERVICE APPLICATIONS....


thanks in advance...

-- 
__________________
Alessandro Pedrotti
Anthesi s.r.l.
via M.Misone, 14 - Riva del Garda (ITALY)
Tel. +39 0464 553300 Fax. +39 0464 559010
Http://www.anthesi.it - www.isiportal.com
-----------------------------------------------------------------------
Nota di riservatezza : Il presente messaggio, corredato dei relativi allegati, contiene informazioni da considerarsi strettamente riservate,ed è destinato esclusivamente al destinatario sopra indicato, il quale è l'unico autorizzato ad usarlo, copiarlo e, sotto la propria responsabilità, diffonderlo.Chiunque ricevesse questo messaggio per errore o comunque lo leggesse senza esserne legittimato è avvertito che trattenerlo, copiarlo, divulgarlo, distribuirlo a persone diverse dal destinatario è severamente proibito, ed è pregato di rinviarlo immediatamente al mittente distruggendone l'originale. Grazie.
Confidentiality Notice : This message, together with its annexes, contains information to be deemed strictly confidential and is destined only to the addressee(s) identified above who only may use, copy and, under his/their responsibility, further disseminate it. If anyone received this message by mistake or reads it without entitlement is forewarned that keeping, copying, disseminating or distributing this message to persons other than the addressee(s) is strictly forbidden and is asked to transmit it immediately to the sender and to erase the original message received. Thank you.