Thank you for the reply Bill Burke. I already have two Postgre databases setup 
and registered as you suggested. They are both Postgre databases, and here are 
their configuration files:

db1-ds.xml:

  | <datasources>
  |   <local-tx-datasource>
  |     <jndi-name>DB1</jndi-name>
  |     <connection-url>jdbc:postgresql://localhost:5432/db1</connection-url>
  |     <driver-class>org.postgresql.Driver</driver-class>
  |     <user-name>username</user-name>
  |     <password>password</password>
  |       <metadata>
  |          <type-mapping>PostgreSQL 7.2</type-mapping>
  |       </metadata>
  |   </local-tx-datasource>
  | 
  | </datasources>

db2-ds.xml
<datasources>
  |   <local-tx-datasource>
  |     <jndi-name>DB2</jndi-name>
  |     <connection-url>jdbc:postgresql://localhost:5432/db2</connection-url>
  | 
  |     <driver-class>org.postgresql.Driver</driver-class>
  |     <user-name>username</user-name>
  |     <password>password</password>
  | 
  |       <metadata>
  |          <type-mapping>PostgreSQL 7.2</type-mapping>
  |       </metadata>
  |   </local-tx-datasource>
  | </datasources>

Both -ds files are in my deploy directory. JBoss indicates they are registered 
to JNDI on startup. However, the problem still persists, both EAR files are 
connecting to the DefaultDS. In an attempt to troubleshoot the problem, I found 
that If I modify the default DS in the hibernate properties file at:

/JB)SS_HOME/server/all/deploy/ejb3.deployer/META-INF/persistence.properties

such that the following line:

  | hibernate.connection.datasource=java:/DefaultDS
  | 
becomes:

  | hibernate.connection.datasource=java:/DB1
  | 

then both EAR files connect to DB1. I am unable to get each EAR to connect to 
its own DB. Do you know what I am doing wrong?

Thank you again for your help.








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

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


-------------------------------------------------------
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