Protege 3.5

edu.stanford.smi.protege.storage.database.pool
Class ConnectionPool

java.lang.Object
  extended by edu.stanford.smi.protege.storage.database.pool.ConnectionPool

public class ConnectionPool
extends Object

A Connection Pool

Thread Safety: get/ungetConnection are thread safe. Once a jdbc Connection has been obtained, it should only be handled in a single thread.


Field Summary
static String PROPERTY_LONG_RUNNING_CONNECTIONS
           
static String PROPERTY_MAX_DB_CONNECTIONS
           
static String PROPERTY_REFRESH_CONNECTIONS_TIME
           
 
Method Summary
 void closeStatements(Connection connection)
           
 void dereference()
           
 Connection getConnection()
           
static ConnectionPool getConnectionPool(String driver, String url, String username, String password)
           
 int getId(Connection connection)
           
 PreparedStatement getPreparedStatement(Connection connection, String text)
           
 Statement getStatement(Connection connection)
           
 void reference()
           
 void reportProblem(Connection connection)
           
 void ungetConnection(Connection connection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_REFRESH_CONNECTIONS_TIME

public static final String PROPERTY_REFRESH_CONNECTIONS_TIME
See Also:
Constant Field Values

PROPERTY_MAX_DB_CONNECTIONS

public static final String PROPERTY_MAX_DB_CONNECTIONS
See Also:
Constant Field Values

PROPERTY_LONG_RUNNING_CONNECTIONS

public static final String PROPERTY_LONG_RUNNING_CONNECTIONS
See Also:
Constant Field Values
Method Detail

getConnectionPool

public static ConnectionPool getConnectionPool(String driver,
                                               String url,
                                               String username,
                                               String password)

getId

public int getId(Connection connection)

getConnection

public Connection getConnection()
                         throws SQLException
Throws:
SQLException

ungetConnection

public void ungetConnection(Connection connection)

getStatement

public Statement getStatement(Connection connection)
                       throws SQLException
Throws:
SQLException

getPreparedStatement

public PreparedStatement getPreparedStatement(Connection connection,
                                              String text)
                                       throws SQLException
Throws:
SQLException

reference

public void reference()

dereference

public void dereference()
                 throws SQLException
Throws:
SQLException

closeStatements

public void closeStatements(Connection connection)
                     throws SQLException
Throws:
SQLException

reportProblem

public void reportProblem(Connection connection)
                   throws SQLException
Throws:
SQLException

Protege 3.5

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2013 Stanford University.