Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.database
Class ConnectionPool

java.lang.Object
  extended by com.jivesoftware.base.database.ConnectionPool

public class ConnectionPool
extends java.lang.Object

Database connection pool implementation.

Two Jive properties control database-specific features:


Field Summary
static java.lang.String POOL_ALIAS
           
 
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)
           
 
Method Summary
 void destroy()
           
 int getActiveConnectionCount()
          Returns the number of open connections that are actively in use.
 java.sql.Connection getConnection()
           
 int getSize()
          Returns the current number of connections in the pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POOL_ALIAS

public static final java.lang.String POOL_ALIAS
See Also:
Constant Field Values
Constructor Detail

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
Method Detail

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.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.