Hi,

I am using Openejb 3.2 with an Embedded Configuration. I stumbled upon the
following problem, for which I found a workaround but i still wonder if
there is no better solution.

For my code I use two different DataBases. Further i use different ejb.jar's
which are not under my control. So I can't change the persistence.xml or
anything. Understandable  the auto-linking can't guess the correct Data
Source for the different ejb.jars to use. So my workaround ist to define for
each JNDI-Name the ejb.jars definie in their persistence.xml the correct
database:

<jndi-name1> = new:/Resource?type=Datasource
<configuration for database 1>

<jndi-name2> = new:/Resource?type=Datasource
<configuration for database 2>

<jndi-name3> = new:/Resource?type=Datasource
<configuration for database 1>

The problem with the solution ist of course, that i have to definie the same
Database configuration several times. 

Is there a way to reference the DataSource definition. Like: for jndi-name3
use the datasource defined under jndi-name1?

Thanks in advance
Tom








--
View this message in context: 
http://openejb.979440.n4.nabble.com/Reusing-Datasource-tp4659727.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to