Name
DataSourceWrapper
Synopsis
Class Name: |
com.ora.jsp.sql.DataSourceWrapper |
Extends: |
None |
Implements: |
javax.sql.DataSource |
Description
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.
Class Summary
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; }
Constructor
-
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 ...
Get Java Server Pages now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.