2 Replies Latest reply on Oct 18, 2004 5:46 PM by darranl

    Configuring multiple datasources

    korper

      Hi,

      I've configure 2 datasources in jboss-3.2.5 using the postgres-ds.xml file. I've deployed it in the /default/deploy dir. I've also deployed 2 applications, one ear and one war file. The ear file is using PostgresDS and the war file is using the OtherDS. What happens is that the ear application is picking up the OtherDS configuration and off course can't find the tables it wants, since they are in the PostgresDS.

      What am I doing wrong ?

      Here is the content of the datasource file:


      <local-tx-datasource>
      <jndi-name>PostgresDS</jndi-name>
      <connection-url>jdbc:postgresql://127.0.0.1:5432/database1</connection-url>
      <driver-class>org.postgresql.Driver</driver-class>
      <user-name>user</user-name>
      pass
      </local-tx-datasource>

      <local-tx-datasource>
      <jndi-name>OtherDS</jndi-name>
      <connection-url>jdbc:postgresql://127.0.0.1:5432/database2</connection-url>
      <driver-class>org.postgresql.Driver</driver-class>
      <user-name>user</user-name>
      pass
      </local-tx-datasource>