Still stuck, but I found out that both EAR files are connecting to the 
DefaultDS hypersonic database that is setup with JBoss. How would I specify 
exactly what database each EAR should connect to? Here are the persistence.xml 
files within my skeleton ejb3 files within each EAR:

<entity-manager>
  |     <name>ContextRoot1</name>
  |   <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |   <jta-data-source>java:/DB1</jta-data-source>
  |   <non-jta-data-source>java:/DB1</non-jta-data-source>
  |     <class>beans.entity.bean1</class>
  |     <class>beans.entity.bean2</class>
  |   <properties>
  |             <property name="hibernate.dialect" 
value="org.hibernate.dialect.PostgreSQLDialect"/>
  |             <property name="hibernate.hbm2ddl.auto" value="update"/>
  |             <property name="hibernate.connection.datasource" 
value="java:/DB1"/>
  |   </properties>
  | </entity-manager>

<entity-manager>
  |     <name>ContextRoot2</name>
  |   <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |   <jta-data-source>java:/DB2</jta-data-source>
  |   <non-jta-data-source>java:/DB2</non-jta-data-source>
  |     <class>beans.entity.bean1</class>
  |     <class>beans.entity.bean2</class>
  |   <properties>
  |             <property name="hibernate.dialect" 
value="org.hibernate.dialect.PostgreSQLDialect"/>
  |             <property name="hibernate.hbm2ddl.auto" value="update"/>
  |             <property name="hibernate.connection.datasource" 
value="java:/DB2"/>
  |   </properties>
  | </entity-manager>

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3915345


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to