Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> DataSource
I think there 2 ways to setup datasource and connection pool :
1. Setup Datasource and Connection pool at the Application Server (Weblogic,
Websphere etc) and then use servlet code to access them.
2. Embed the code in the servlet like :
e.g. OracleConnectionPoolDataSource ocpds = new
OracleConnectionPoolDataSource();
// Set connection parameters ocpds.setURL("jdbc:oracle:thin:@"+ dbHost + ":" + dbPort + ":" + dbName); ocpds.setUser(usrNm); ocpds.setPassword(usrPw); PooledConnection pc = ocpds.getPooledConnection();
Which one is the best way (highest performance)? What are their cons and pros?
Thanks.
Chris
Received on Wed Oct 17 2001 - 06:04:55 CDT
![]() |
![]() |