com.jnetdirect.jsql
Class JSQLConnectionPool

java.lang.Object
  extended by com.jnetdirect.jsql.JSQLConnectionPool

public class JSQLConnectionPool
extends java.lang.Object

JSQLConnectionPool is deprecated. Please use the JSQLPoolingDataSource instead.

Since:
1.0
Author:
David Murphy

Constructor Summary
JSQLConnectionPool(JSQLConnectionPoolDataSource ds)
          Create a pool.
 
Method Summary
 void closeAllConnections()
          Close all connection in the pool.
 int getAvailableConnectionCount()
          Return the total number of physical connections currently available.
 java.sql.Connection getConnection()
          Get a connection from the pool.
 java.sql.Connection getConnection(java.lang.String user, java.lang.String password)
          Get a connection from the pool.
 int getConnectionCount()
          Return the total number of physical connections open in the pool.
 int getErroredConnectionCount()
          Return the total number of physical connections that were removed from the pool due to errors in their connections.
 int getLogicalOpennedCount()
          Return the total number of logical connections issued.
 java.lang.String getStatus()
          Return the status of the pool.
 int getTimeOutConnectionCount()
          Return the total number of physical connections that were closed because they exceeded the idle time for timeout setting.
 int getUsedConnectionCount()
          Return the total number of physical connections currently in use.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSQLConnectionPool

public JSQLConnectionPool(JSQLConnectionPoolDataSource ds)
Create a pool.

Parameters:
ds - the datasource
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Get a connection from the pool.

Returns:
the connection
Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection(java.lang.String user,
                                         java.lang.String password)
                                  throws java.sql.SQLException
Get a connection from the pool.

Parameters:
user - the user
user - the password
Returns:
the connection
Throws:
java.sql.SQLException

getStatus

public java.lang.String getStatus()
Return the status of the pool.

Returns:
the status

closeAllConnections

public void closeAllConnections()
                         throws java.sql.SQLException
Close all connection in the pool.

Throws:
java.sql.SQLException

getConnectionCount

public int getConnectionCount()
Return the total number of physical connections open in the pool.


getUsedConnectionCount

public int getUsedConnectionCount()
Return the total number of physical connections currently in use.


getAvailableConnectionCount

public int getAvailableConnectionCount()
Return the total number of physical connections currently available.


getErroredConnectionCount

public int getErroredConnectionCount()
Return the total number of physical connections that were removed from the pool due to errors in their connections.


getTimeOutConnectionCount

public int getTimeOutConnectionCount()
Return the total number of physical connections that were closed because they exceeded the idle time for timeout setting.


getLogicalOpennedCount

public int getLogicalOpennedCount()
Return the total number of logical connections issued.