I use separate *-ds.xml files, one for each datasource. Note that these files
work perfectly when an application runs on its own. The problem occurs when two
applications are loaded, each application referencing a different file through
JNDI. In effect, the two applications end up using the first file's database
(lda_inter).
1) First *-ds.xml
===========
<?xml version="1.0" encoding="UTF-8"?>
<local-tx-datasource>
<jndi-name>PostgreSQLDSsitaInternetSPE</jndi-name>
<!-- PCPIE Network server connection string -->
<connection-url>jdbc:postgresql://pcpie:5432/lda_inter</connection-url>
<!-- SITA Network server connection string
<connection-url>jdbc:postgresql://ilanga-dev:5432/lda_inter</connection-url>
-->
<!-- LDA AgriPortal Network server connection string
<connection-url>jdbc:postgresql://10.156.123.40:5432/lda_inter</connection-url>
-->
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
passdeword
<check-valid-connection-sql>set search_path to
lda_inter;</check-valid-connection-sql>
<new-connection-sql>set search_path to lda_inter;</new-connection-sql>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
</local-tx-datasource>
2nd *-ds.xml
=========
<?xml version="1.0" encoding="UTF-8"?>
<local-tx-datasource>
<jndi-name>PostgreSQLDSsitaIntranetSPE</jndi-name>
<!-- PCPIE Network server connection string -->
<connection-url>jdbc:postgresql://pcpie:5432/limpAgriIntra</connection-url>
<!-- SITA Network server connection string
<connection-url>jdbc:postgresql://ilanga-dev:5432/limpAgriIntra</connection-url>
-->
<!-- LDA AgriPortal Network server connection string
<connection-url>jdbc:postgresql://10.156.123.41:5432/limpAgriIntra</connection-url>
-->
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
passdeword
<check-valid-connection-sql>set search_path to
limpAgriIntra;</check-valid-connection-sql>
<new-connection-sql>set search_path to limpAgriIntra;</new-connection-sql>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
</local-tx-datasource>
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3943158#3943158
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3943158
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user