com.ora.jsp.sql
Class ConnectionPool

java.lang.Object
  |
  +--com.ora.jsp.sql.ConnectionPool

public class ConnectionPool
extends java.lang.Object

This class implements a connection pool. It's the same as the ConnectionPool class described in Java Servlet Programming (O'Reilly), copied with permission from Jason Hunter. It's used by the DataSourceWrapper class to provide a JDBC 2.0 DataSource interface to the pool.

Version:
1.0
Author:
Jason Hunter,

Field Summary
private  java.util.Hashtable connections
           
private  java.lang.String dbURL
           
private  int increment
           
private  java.lang.String password
           
private  java.lang.String user
           
 
Constructor Summary
ConnectionPool(java.lang.String dbURL, java.lang.String user, java.lang.String password, java.lang.String driverClassName, int initialConnections, int increment)
           
 
Method Summary
 java.sql.Connection getConnection()
           
 void returnConnection(java.sql.Connection returned)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

connections

private java.util.Hashtable connections

increment

private int increment

dbURL

private java.lang.String dbURL

user

private java.lang.String user

password

private java.lang.String password
Constructor Detail

ConnectionPool

public ConnectionPool(java.lang.String dbURL,
                      java.lang.String user,
                      java.lang.String password,
                      java.lang.String driverClassName,
                      int initialConnections,
                      int increment)
               throws java.sql.SQLException,
                      java.lang.ClassNotFoundException
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException

returnConnection

public void returnConnection(java.sql.Connection returned)