1 Reply Latest reply on Sep 17, 2004 9:03 AM by Ken Kachnowich

    Multible Postgres DBs and DS - I get connection to wrong DB

    Ken Kachnowich Newbie


      I am using JBoss 3.2.3 and Postgres 7.3.4 with the JDBC jar
      from postgres in JBoss server/default/lib. This is on a IRIX64/6.5
      system with Java 1.4.1_06, if that matters.

      I have two databases created in Postgres and two -ds.xml files
      deployed. I do a JNDI lookup of the DataSources and get the
      connection from them. Much of the time both connections
      are to the same database (I print some MetaData info on error)
      and I get 'Resource not found' errors. Sometimes it works fine.

      I made a Java test application that connects to the databases
      using the same JVM, postgresql.jar and database URLs and it
      works correctly everytime.

      Any idea's what I could try or if this is even a JBoss issue?


      select 1 from TABLE1 where 1=2
      select 1 from TABLE1 where 1=2


      Rest is basicly the same with different user and TABLE name.
      I could not figure out how to get the password to show right,
      thats the XXX line.