This content has been marked as final.
Show 3 replies
-
1. Re: oracle with different useres
lafr Sep 22, 2005 5:24 PM (in response to pv2005)You can put all your datasources into one oracle-ds.xml.
The root tag datasources can have an unlimited number of local-tx-datasource children. -
2. Re: oracle with different useres
pv2005 Sep 23, 2005 4:41 AM (in response to pv2005)"lafr" wrote:
You can put all your datasources into one oracle-ds.xml.
The root tag datasources can have an unlimited number of local-tx-datasource children.
I've done that now I have<datasources> <local-tx-datasource> <jndi-name>OracleDS</jndi-name> <connection-url>jdbc:oracle:thin:@192.165.12.200:1521:ded</connection-url> <driver-class>oracle.jdbc.driver.OracleDriver</driver-class> <user-name>adm</user-name> <password>adm</password> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name> <metadata> <type-mapping>Oracle9i</type-mapping> </metadata> </local-tx-datasource> <local-tx-datasource> <jndi-name>CliDS</jndi-name> <connection-url>jdbc:oracle:thin:@192.165.12.200:1521:ded</connection-url> <driver-class>oracle.jdbc.driver.OracleDriver</driver-class> <user-name>CLI</user-name> <password>321</password> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name> <metadata> <type-mapping>Oracle9i</type-mapping> </metadata> </local-tx-datasource> </datasources>
and when I use the OracleDS in my java class it works well but when I use the CliDS is says not bound.
In the jmx-console there are both MBeans one for OracleDS and one for CliDS.
What am I missing?
thanks -
3. Re: oracle with different useres
pv2005 Sep 23, 2005 5:07 AM (in response to pv2005)Found the solution in my java I had
ds = (DataSource)ctx.lookup("java:comp/env" + db);
and it was working fine for OracleDS
now I've triedds = (DataSource)ctx.lookup("java:" + db);
and it works for both :)
now I've a question about connection pooling but it's best to put it in a new thread.
thanks