|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.funambol.email.inboxlistener.engine.DBConnectionProvider
public class DBConnectionProvider
Provides a db connection pool using a
org.apache.commons.dbcp.BasicDataSource.
It's a singleton class but it must be configured calling the method
configure(BasicDataSource)
| Method Summary | |
|---|---|
static void |
close()
Closes the datasource |
protected static void |
configure(org.apache.commons.dbcp.BasicDataSource ds)
Configures the DBConnectionProvider instance. |
static java.sql.Connection |
getConnection()
Returns an available connection |
static int |
getMaxActive()
Returns the max active cnnections of the DBConnectionProvider |
static int |
getMaxIdle()
Returns the max idle cnnections of the DBConnectionProvider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.sql.Connection getConnection()
throws java.sql.SQLException
java.sql.SQLException - if an error occurs
public static void close()
throws java.sql.SQLException
java.sql.SQLException - if an error occurspublic static int getMaxActive()
public static int getMaxIdle()
protected static void configure(org.apache.commons.dbcp.BasicDataSource ds)
throws java.sql.SQLException
ds - the BasicDataSource
java.sql.SQLException - if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||