I think the more related to synonyms It's possible for ejbs, but we don't actually have the same feature for datasources
JLouis 2012/12/17 Romain Manni-Bucau <[email protected]> > Hi, > > First i think we never release openejb 3.2 > > Then you can define the datasource globally either in conf/openejb.xml or > as properties of the container (initialcontext). Just match the expectes > name in persistence.xml > Le 17 déc. 2012 08:25, "tkayser" <[email protected]> a écrit : > > > 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. > > > -- Jean-Louis
