December 2000
Intermediate to advanced
574 pages
17h 3m
English
DataSourceWrapper
|
Class Name: |
com.ora.jsp.sql.DataSourceWrapper |
|
Extends: |
None |
|
Implements: |
javax.sql.DataSource |
This class is a wrapper implementing the JDBC 2.0 SE
DataSource interface, used to make the
ConnectionPool class look like a JDBC 2.0
DataSource. It can easily be modified to be used
as a wrapper for any JDBC 1.0 connection pool implementation.
public class DataSourceWrapper implements javax.sql.DataSource {
// Constructor
public DataSourceWrapper(String driverClass, String url,
String user, String pw)
throws ClassNotFoundException, InstantiationException,
java.sql.SQLException, IllegalAccessException;
// Methods
public java.sql.Connection getConnection( )
throws java.sql.SQLException;
public void returnConnection(java.sql.Connection conn);
// Methods with dummy implementations
public java.sql.Connection getConnection(String username,
String password) throws java.sql.SQLException;
public int getLoginTimeout( ) throws java.sql.SQLException;
public java.io.PrintWriter getLogWriter( )
throws java.sql.SQLException;
public void setLoginTimeout(int seconds)
throws java.sql.SQLException;
public void setLogWriter(java.io.PrintWriter out)
throws java.sql.SQLException;
}public DataSourceWrapper(String driverClass, String url, String user, String pw) throws ClassNotFoundException, InstantiationException, java.sql.SQLException, IllegalAccessException
Creates a connection pool for the specified JDBC URL using the specified JDBC driver ...
Read now
Unlock full access