This question is OFF-TOPIC for SERVLET-INTEREST. Questions regarding
JDBC are better directed to the jdbc forum at
http://developer.java.sun.com/developer/community/forum.jshtml.
Questions about Oracle are best directed to the forums at
technet.oracle.com.
DataSource objects were introduced with JDBC 2.0. According to the JDBC
Tutorial (http://developer.java.sun.com/developer/Books/JDBCTutorial/,
section 3.7), the DataSource is intended to replace the DriverManager.
So, if an OracleConnectionPoolDataSource is an implementation of the
DataSource interface, then you should always use it in preference to
DriverManager. See
http://technet.oracle.com/doc/oracle8i_816/java.816/a81354/connpoc1.htm#1047636
and
http://technet.oracle.com/doc/oracle8i_816/java.816/a81354/connpoc2.htm
K Mukhar
Ramón Gómez Chavez wrote:
>
> Hi I have a doubt about the different ways to get a JDBC Connections.
> Especifically, about when and why use the "DriverManager Connection" and
> when and why use the "OracleConnectionPoolDataSource"
> for example:
>
> /*
>
> OracleConnetionPoolDataSource ocpds = new OracleConnetionPoolDataSource();
>
> // Set Connection parameters
> .
> .
> .
>
> // Create a pooled Connection
> PooledConnection pc = ocpds.getPooledConnetion();
>
> // get a logical connection
> Connection conn = pc.getconecction();
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html