com.jivesoftware.base.database
Class ConnectionPool
java.lang.Object
com.jivesoftware.base.database.ConnectionPool
public class ConnectionPool
- extends java.lang.Object
Database connection pool implementation.
Two Jive properties control database-specific features:
- database.mysql.useUnicode -- MySQL doesn't currently support Unicode.
However, a workaround is implemented in the MySQL JDBC driver. Setting this property
to true will turn this feature on.
- database.oracle.useStatementCache -- the Oracle JDBC driver optionally
supports caching Statement and PreparedStatement objects, which can improve
performance. Setting this property to true will
Constructor Summary |
ConnectionPool(java.lang.String driver,
java.lang.String serverURL,
java.lang.String username,
java.lang.String password,
int minCon,
int maxCon,
double conTimeout)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
POOL_ALIAS
public static final java.lang.String POOL_ALIAS
- See Also:
- Constant Field Values
ConnectionPool
public ConnectionPool(java.lang.String driver,
java.lang.String serverURL,
java.lang.String username,
java.lang.String password,
int minCon,
int maxCon,
double conTimeout)
throws java.io.IOException
- Throws:
java.io.IOException
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
destroy
public void destroy()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getActiveConnectionCount
public int getActiveConnectionCount()
- Returns the number of open connections that are actively in use.
- Returns:
- the number of open connections that are actively in use.
getSize
public int getSize()
- Returns the current number of connections in the pool. The value will be
somewhere beteen the min and max connection values.
- Returns:
- the number of connections in the pool.
Copyright © 1999-2006 Jive Software.