All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.db.JDBC2DataSource

java.lang.Object
   |
   +----org.xmlmiddleware.utils.Pool
           |
           +----org.xmlmiddleware.db.ConnectionPool
                   |
                   +----org.xmlmiddleware.db.JDBC2DataSource

public class JDBC2DataSource
extends ConnectionPool
implements DataSource
Implements a JDBC 2.0 DataSource that pools connections and statements for a DataSource that doesn't.

If you have a JDBC 2.0 DataSource that pools connections but not statements, use StatementPoolDataSource. If you have a JDBC 2.0 DataSource that pools both connections and statements, use it directly.

Version:
2.0
Author:
Sean Walter, 2001

Constructor Index

 o JDBC2DataSource(DataSource)
Create a new JDBC2DataSource.
 o JDBC2DataSource(String, String)

Method Index

 o getConnection()
 o getConnection(String, String)
 o getLoginTimeout()
 o getLogWriter()
 o setLoginTimeout(int)
 o setLogWriter(PrintWriter)

Constructors

 o JDBC2DataSource
 public JDBC2DataSource(DataSource ds) throws SQLException
Create a new JDBC2DataSource.

Parameters:
ds - A JDBC 2.0 DataSource that does not pool statements or connections.
 o JDBC2DataSource
 public JDBC2DataSource(String jndiContext,
                        String dataSource)

Methods

 o getConnection
 public Connection getConnection() throws SQLException
 o getConnection
 public Connection getConnection(String username,
                                 String password) throws SQLException
 o getLogWriter
 public PrintWriter getLogWriter() throws SQLException
 o setLogWriter
 public void setLogWriter(PrintWriter out) throws SQLException
 o setLoginTimeout
 public void setLoginTimeout(int seconds) throws SQLException
 o getLoginTimeout
 public int getLoginTimeout() throws SQLException

All Packages  Class Hierarchy  This Package  Previous  Next  Index