JBoss Community

Re: one data source with multiple Oracle database users

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

When you lookup of JNDI change

 

Connection con = null;
DataSource ds = null;

....

 

InitialContext iniCtx = new InitialContext();

 

If you want user Too Uses:

 

ds = (DataSource) iniCtx.lookup("TooWsDataSource");

...

 

if you want user Too2 Uses:

 

ds = (DataSource) iniCtx.lookup("TooWsDataSourcePt");

 

....

 

con = ds.getConnection();

Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community