[jboss-user] [EJB 3.0] - Re: Two databases, two persistence-units but one entity jar-
dkalna
do-not-reply at jboss.com
Thu Jan 25 06:49:53 EST 2007
Hi Ville,
I think you have to explicitly specify your Entities in persistence.xml, otherwise they will deployed to "default" = first one, only.
<persistence-unit name=" my-operative-db ">
<jta-data-source> java:/my-operative-db </jta-data-source>
<jar-file> ../entity-data.jar </jar-file>
com.yourhost.domain.Entity1
com.yourhost.domain.Entity2
<properties...
</persistence-unit>
<persistence-unit name=" my-backup-db ">
<jta-data-source> java:/my-backup-db </jta-data-source>
<jar-file> ../entity-data.jar </jar-file>
com.yourhost.domain.Entity1
com.yourhost.domain.Entity2
<properties...
</persistence-unit>
Bye
Dalibor
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4006299#4006299
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4006299
More information about the jboss-user
mailing list