Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> DataSource

DataSource

From: Chris <chris.lo_at_cyberwisdom.net>
Date: Wed, 17 Oct 2001 19:04:55 +0800
Message-ID: <9qjnjr$duk$1@tenorhorn.hk.dyxnet.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US