I am using WSAD4.0.3 in our project. For our application we have two Oracle 9i DBs.We have some tables in DB1 and rest in the other DB2. For my testing i am using the Advance Single Server Edition included in WSAD4.0.3. On the server configuration, i created two datasources, one for each DB, with JNDI names as jdbc/ds1 and jdbc/ds2, and default values for time attributes.
//User Login Process.
Call Business delegate method.
Call Session bean method.
Call DAO method...
Datasource ds1 = (Datasource)context.lookup("jdbc/ds1");
Connection con1 = ds1.getConnection();
// Create and Execute the prepared stmt 1(SELECT * FROM DEMO1)
con1.close();
//For Next Action
Call Business delegate method.
Call Session bean method.
Call DAO method...
Datasource ds2 = (Datasource)context.lookup("jdbc/ds2");
Connection con2 = ds2.getConnection();
// Create and Execute the prepared stmt 2 (SELECT * FROM DEMO2)
con2.close();
Its executing prepared stmt 2 using the connection con1 and the table DEMO2 doesnt exist in DB1. Thats why i am getting Table doesnt exist error. Please advise.
Thanks
Ravi.
-
Two datasources connection problem WSAD4.0.3 (1 messages)
- Posted by: Ravi Surapaneni
- Posted on: February 14 2005 14:54 EST
Threaded Messages (1)
- Two datasources connection problem WSAD4.0.3 by sriram chandra on February 14 2005 19:16 EST
-
Two datasources connection problem WSAD4.0.3[ Go to top ]
- Posted by: sriram chandra
- Posted on: February 14 2005 19:16 EST
- in response to Ravi Surapaneni
check the user previliges for DS2. Chk if he can access that table(if he is admin etc). Also close ds1.
thanks
Sri