Sorry of course the typos are not intended. I changed them to not spoil
projects names and made the typos. 

I use the id "jdbc/Db1" and "jdbc/Db2" in tomee.xml and of course I use the
same values in my persistence.xml as names of jta datasources. 

To inject the PersistenceManager I use @PersistenceContext("DB1_PU") and
@PersistenceContext("DB2_PU"),
the same values as the name of the persistence units in the persistence.xml

Now we have also the case that we have a single application with two
datasources. Sometimes the correct datasource is used and sometimes not. 

Have you ever testes tomcat with multiples datasources and jpa? I still
think there is something wrong. 






--
View this message in context: 
http://openejb.979440.n4.nabble.com/TomEE-uses-wrong-DataSource-for-JPA-tp4666124p4666185.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to