Right, but in my tests, if you had different unit names then the entity beans 
couldn't have any relationships between them.

The only solution I have found is like raja05 said, is to put the 
persistence.xml in a jar file in the ear file. And then reference from that 
persistence.xml file all the other jars.


"grdzeli_kaci" wrote : hi all, i had already problem like this and my mistake 
was that i hadn't  unitname in the persistance.xml file 
  | i think if u must add this in u your persistance.xml 
  | 
  | 
  |   |         <persistence-unit name="Blah1" transaction-type="JTA">
  |   |                 <jta-data-source>java:/XAOracleDS</jta-data-source>
  |   |                 
<class>com.magti.businesslayer.ejb3entity.oracle.Test</class>
  |   |                 <properties>                    
  |   |                  [props]
  |   |                 </properties>
  |   |         </persistence-unit>     
  |   | 
  |   | 
  | in second persistanc.xml
  | 
  |   |         <persistence-unit name="Blah2" transaction-type="JTA">
  |   |                 <jta-data-source>java:/XAOracleDS</jta-data-source>
  |   |                 
<class>com.magti.businesslayer.ejb3entity.oracle.Test</class>
  |   |                 <properties>                    
  |   |                  [props]
  |   |                 </properties>
  |   |         </persistence-unit>     
  |   | 
  |   | 
  | 
  | u also could put more then one persistance unit in one persistance.xml file
  | 
  |   |         <persistence-unit name="Blah1" transaction-type="JTA">
  |   |                 <jta-data-source>java:/XAOracleDS</jta-data-source>
  |   |                 
<class>com.magti.businesslayer.ejb3entity.oracle.Test</class>
  |   |                 <properties>                    
  |   |                  [props]
  |   |                 </properties>
  |   |         </persistence-unit>     
  |   |         <persistence-unit name="Blah2" transaction-type="JTA">
  |   |                 <jta-data-source>java:/XAOracleDS</jta-data-source>
  |   |                 
<class>com.magti.businesslayer.ejb3entity.oracle.Test</class>
  |   |                 <properties>                    
  |   |                  [props]
  |   |                 </properties>
  |   |         </persistence-unit>     
  |   | 
  |   | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965037#3965037

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965037
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to