All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.db.StatementPoolDataSource


public class StatementPoolDataSource
extends Object
implements DataSource, CPConnectionEventListener
Implements a DataSource with statement pooling over a DataSource that does connection pooling.

If you have a JDBC 2.0 DataSource that does not pool connections or statements, use JDBC2DataSource. If you have a JDBC 2.0 DataSource that pools both connections and statements, use it directly.

WARNING: Unlike the other implementations of DataSource in this package, this data source does not retain statement pools when the Connection is closed. This is because closing the Connection returns it to the pool implemented by the underlying DataSource, which is outside of our control.

Sean Walter, 2001

Constructor Index

 o StatementPoolDataSource(DataSource)
Create a new StatementPoolDataSource object.

Method Index

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


 o StatementPoolDataSource
 public StatementPoolDataSource(DataSource ds)
Create a new StatementPoolDataSource object.

ds - A DataSource that pools connections but not statements.


 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
 o connectionClosed
 public void connectionClosed(CPConnectionEvent event)
 o connectionErrorOccurred
 public void connectionErrorOccurred(CPConnectionEvent event)

All Packages  Class Hierarchy  This Package  Previous  Next  Index