borland Packages  Class Hierarchy  javax.sql Package 

JdbcConnectionPool class

java.lang.Object
   +----com.borland.javax.sql.JdbcConnectionPool

About the JdbcConnectionPool class

Properties  Methods  

Implements Designable, Serializable, Referenceable

Note: This is a feature of JBuilder Professional and Enterprise.

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.


JdbcConnectionPool properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

JdbcConnectionPool methods

Methods implemented in this class

Methods implemented in java.lang.Object


JdbcConnectionPool properties

connection

 public Connection getConnection()
A connection to a JDBC data source. This connection is provided by the connection factory implementation specified in the connectionFactory property.

connectionFactory

 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.

See also: dataSourceName

dataSourceName

 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.

See also: connectionFactory

loginTimeout

 public final int getLoginTimeout()
 public final void setLoginTimeout(int seconds)
Currently not used.

logWriter

 public java.io.PrintWriter getLogWriter()
 public void setLogWriter(java.io.PrintWriter out)
Used for output of diagnostic information.

maxConnections

 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.

maxPool

 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.

minPool

 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.

reference

 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.

XAConnection

 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.

JdbcConnectionPool methods

connectionClosed(event)

  public final synchronized void connectionClosed(ConnectionEvent event)
Standard interface implementation of an event notification letting the pool know the connection is closed.

connectionErrorOccurred(event)

  public final void connectionErrorOccurred(ConnectionEvent event)
Standard interface implementation of an event notification letting the pool know a connection error occurred.

getConnection(java.lang.String, java.lang.String)

  public Connection getConnection(String user, String password)
Returns a connection to a JDBC data source.

getXAConnection(java.lang.String, java.lang.String)

  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.

shutdown()

  public final synchronized void shutdown()
Closes all the connections in the pool.