JBoss Community

one data source with multiple Oracle database users

created by Nicolas Kaczmarski in Datasource Configuration - View the full discussion

Dear All,

 

I have 2 application using 2 differents datasources :

 

<?xml version="1.0" encoding="UTF-8"?>
 
<datasources>
  <local-tx-datasource>
    <jndi-name>TooWsDataSource</jndi-name>
    <connection-url>jdbc:oracle:thin:@172.25.225.40:1521:paid</connection-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>Too</user-name>
    <password>too</password>
 
    <metadata>
       <type-mapping>Oracle10g</type-mapping>
    </metadata>
  </local-tx-datasource>
  <!-- New schema for EPT/WS  -->
   <local-tx-datasource>
    <jndi-name>TooWsDataSourcePt</jndi-name>
    <connection-url>jdbc:oracle:thin:@172.25.225.40:1521:paid</connection-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>Too2</user-name>
    <password>too</password>
    <metadata>
       <type-mapping>Oracle10g</type-mapping>
    </metadata>
  </local-tx-datasource>
</datasources>
 

 

But when the second application do an sql request the user used is "Too" instead of "Too2".

Have you ideas?

Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community