Class ConnectionPoolManager

java.lang.Object
net.simplace.core.database.ConnectionPoolManager

public class ConnectionPoolManager extends Object
Simple implementation of a JDBC connection pool manager.
  • Constructor Details

    • ConnectionPoolManager

      public ConnectionPoolManager()
  • Method Details

    • getInstance

      public static ConnectionPoolManager getInstance()
      Returns:
      connection pool manager
    • freeConnection

      public void freeConnection(String aName, Connection aConnection)
      Parameters:
      aName -
      aConnection -
    • freeConnection

      public void freeConnection(Connection aConnection)
      Parameters:
      aConnection -
    • getConnection

      public Connection getConnection(String aName) throws SQLException
      Parameters:
      aName -
      Returns:
      a Connection specified by aName
      Throws:
      SQLException
    • getConnection

      public Connection getConnection(String aName, long aTime) throws SQLException
      Parameters:
      aName -
      aTime -
      Returns:
      a Connection specified by aName
      Throws:
      SQLException
    • releaseAll

      public void releaseAll()
    • release

      public void release(String aPoolKey)
      Parameters:
      aPoolKey -
    • releaseAll

      public void releaseAll(String aSystemID)
      Parameters:
      aSystemID -
    • createPool

      public void createPool(String aPoolName, String aJDBCDriver, String aJDBCURL, String aSystemID, String aUser, String aPassword, int aMaxConnections)
      Parameters:
      aPoolName -
      aJDBCDriver -
      aJDBCURL -
      aSystemID -
      aUser -
      aPassword -
      aMaxConnections -
    • renewPool

      public void renewPool(String aPoolName, String aJDBCDriver, String aJDBCURL, String aSystemID, String aUser, String aPassword, int aMaxConnections)
      Parameters:
      aPoolName -
      aJDBCDriver -
      aJDBCURL -
      aSystemID -
      aUser -
      aPassword -
      aMaxConnections -
    • createTempPool

      public static void createTempPool(String aPoolName)
      Parameters:
      aPoolName -
    • createH2TempPool

      public static void createH2TempPool(String aPoolName, int aPoolSize)
      Parameters:
      aPoolName -
      aPoolSize -
    • createHSQLTempPool

      public static void createHSQLTempPool(String aPoolName, int aPoolSize)
      Parameters:
      aPoolName -
      aPoolSize -
    • createPermanentPool

      public static void createPermanentPool(String aPoolName)
      Parameters:
      aPoolName -
    • hasPool

      public boolean hasPool(String aName)