JavaXT
|
|
ConnectionPool ClassA lightweight standalone JDBC connection pool manager.
Constructors ConnectionPool( ConnectionPoolDataSource dataSource, int maxConnections, Integer timeout )
Public MethodsgetConnection( ) returns Connection Retrieves a connection from the connection pool. If getValidConnection( ) returns Connection Retrieves a connection from the connection pool and ensures that it is valid by calling {@link Connection#isValid(int)}. If a connection is not valid, the method tries to get another connection until one is valid (or a timeout occurs). Pooled connections may become invalid when e.g. the database server is restarted. This method is slower than {@link #getConnection()} because the JDBC driver has to send an extra command to the database server to test the connection. This method requires Java 1.6 or newer. getActiveConnections( ) returns synchronized int Returns the number of active (open) connections of this pool. This is the number of getInactiveConnections( ) returns synchronized int Returns the number of inactive (unused) connections in this pool. This is the number of internally kept recycled connections, for which Public Classes |