net.simplace.util.hsql.ConnectionPoolManager

Simple implementation of a JDBC connection pool manager.


public class ConnectionPoolManager {
// Public Constructors
public ConnectionPoolManager();


// Class Methods
public static 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 synchronized void freeConnection(String aName, Connection aConnection);

public synchronized void freeConnection(Connection aConnection);

public synchronized Connection getConnection(String aName)
throws SQLException;


returns a Connection specified by aName
public synchronized 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 synchronized void createPool(String aPoolName, String aJDBCDriver,
String aJDBCURL, String aSystemID, String aUser, String aPassword, int
aMaxConnections);

public boolean hasPool(String aName);



}



Returned by: getInstance()