org.rimudb.pool
Class DBCPConnectionManager

java.lang.Object
  extended by org.rimudb.pool.DBCPConnectionManager
All Implemented Interfaces:
IConnectionManager

public class DBCPConnectionManager
extends java.lang.Object
implements IConnectionManager


Constructor Summary
DBCPConnectionManager(DatabaseConfiguration dbConfig)
           
 
Method Summary
 void connect(java.lang.String user, java.lang.String password)
          Connect to the database.
 void disconnect()
          Disconnect from the database.
 java.sql.Connection getDatabaseConnection()
          Get a database connection, presumably from a pool.
 PoolStatistic getPoolStatistic()
          Return a PoolStatistic describing the current status of the pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBCPConnectionManager

public DBCPConnectionManager(DatabaseConfiguration dbConfig)
Method Detail

connect

public void connect(java.lang.String user,
                    java.lang.String password)
             throws java.lang.Exception
Description copied from interface: IConnectionManager
Connect to the database.

Specified by:
connect in interface IConnectionManager
Parameters:
user - String
password - String
Throws:
java.lang.Exception

disconnect

public void disconnect()
                throws RimuDBException
Description copied from interface: IConnectionManager
Disconnect from the database.

Specified by:
disconnect in interface IConnectionManager
Throws:
RimuDBException

getDatabaseConnection

public java.sql.Connection getDatabaseConnection()
                                          throws java.sql.SQLException
Description copied from interface: IConnectionManager
Get a database connection, presumably from a pool.

Specified by:
getDatabaseConnection in interface IConnectionManager
Returns:
Connection
Throws:
java.sql.SQLException

getPoolStatistic

public PoolStatistic getPoolStatistic()
                               throws RimuDBException
Description copied from interface: IConnectionManager
Return a PoolStatistic describing the current status of the pool.

Specified by:
getPoolStatistic in interface IConnectionManager
Returns:
PoolStatistic
Throws:
RimuDBException


Copyright © 2008-2011 Simon Ritchie. All Rights Reserved.