net.simplace.util.hsql.ConnectionPoolManager

Simple implementation of a JDBC connection pool manager.


public class ConnectionPoolManager {


// Class Methods
public static synchronized ConnectionPoolManager getInstance();


returns connection pool manager
public static void createTempPool(String aPoolName);

public static void createTempPool(String aPoolName, int aPoolSize);

public static void createPermanentPool(String aPoolName);


// Public Instance Methods
public void freeConnection(String aName, Connection aConnection);

public void freeConnection(Connection aConnection);

public Connection getConnection(String aName) throws SQLException;


returns a Connection specified by aName
public Connection getConnection(String aName, long aTime)
throws SQLException;


returns a Connection specified by aName
public synchronized void releaseAll();

public synchronized void release(String aPoolKey);

public synchronized void releaseAll(String aSystemID);

public void createPool(String aPoolName, String aJDBCDriver, String aJDBCURL,
String aSystemID, String aUser, String aPassword, int aMaxConnections);



}



Returned by: getInstance()