borland Packages Class Hierarchy javax.sql Package
java.lang.Object +----com.borland.javax.sql.JdbcConnectionPool
Properties Methods
Implements Designable, Serializable, Referenceable
JdbcConnectionPool
is a connection pooling implementation which can be used with any JDBC driver. It is also an implementation of javax.sql.DataSource
, and therefore can be registered with a JNDI naming service.
See "Pooling JDBC connections" in the Database Application Developer's Guide for more information.
public Connection getConnection()A connection to a JDBC data source. This connection is provided by the connection factory implementation specified in the
connectionFactory
property.
public final ConnectionPoolDataSource getConnectionFactory() public final void setConnectionFactory(ConnectionPoolDataSource conFactory)Factory implementation of
ConnectionPoolDataSource
that can create PooledConnections
when needed. The dataSourceName
property can also be used to set the ConnectionFactory
.
public String getDataSourceName() public void setDataSourceName(String name)Name used to lookup a connection factory that implements
ConnectionPoolDataSource
in a JNDI naming service. Note that this implementation can also be set directly using the connectionFactory
property.
public final int getLoginTimeout() public final void setLoginTimeout(int seconds)Currently not used.
public java.io.PrintWriter getLogWriter() public void setLogWriter(java.io.PrintWriter out)Used for output of diagnostic information.
public int getMaxConnections() public final void setMaxConnections(int max)Maximum used and pooled connections that can be held open at one time. A setting of 0 causes the limit to not be enforced.
public int getMaxPool() public final void setMaxPool(int max)Maximum size for pooled connections that are not in use. A setting of 0 causes the limit to not be enforced.
public int getMinPool() public final void setMinPool(int min)Minimum size for pooled connections that are not in use when
maxPool
unused connections have been pooled. A setting of 0 causes the limit to not be enforced.
public javax.naming.Reference getReference()This property is needed to persist the
JdbcConnectionPool
in some JNDI implementations. You usually do not need to use this property.
public XAConnection getXAConnection()A pooled connection to a JDataStore via the JDataStore JDBC driver, for use in a distributed transaction. This connection is provided by a
JdbcConnectionFactory
which is connected to a JDataStore. XAConnection
is only useful when used in conjunction with a distributed transaction manager, such as the one provided by the Inprise Application Server.
public final synchronized void connectionClosed(ConnectionEvent event)Standard interface implementation of an event notification letting the pool know the connection is closed.
public final void connectionErrorOccurred(ConnectionEvent event)Standard interface implementation of an event notification letting the pool know a connection error occurred.
public Connection getConnection(String user, String password)Returns a connection to a JDBC data source.
public XAConnection getXAConnection(String user, String password)Returns a
XAConnection
to a JDataStore. XAConnections
are only useful in conjunction with a distributed transaction manager, such as the one provided by the Inprise Application Server.
public final synchronized void shutdown()Closes all the connections in the pool.