|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.io.DBConnectionPool
public class DBConnectionPool
class to manage a database connection pool. this is part of the combination of the object pool pattern an the singelton pattern.
Method Summary | |
---|---|
java.sql.Connection |
acquireConnection(java.lang.String driver,
java.lang.String database,
java.util.Properties properties)
|
java.sql.Connection |
acquireConnection(java.lang.String driver,
java.lang.String database,
java.lang.String user,
java.lang.String password)
|
static DBConnectionPool |
getInstance()
realize singelton pattern using double checked locking pattern. |
void |
releaseConnection(java.sql.Connection con,
java.lang.String driver,
java.lang.String database,
java.util.Properties properties)
releases a connection back to the pool |
void |
releaseConnection(java.sql.Connection con,
java.lang.String driver,
java.lang.String database,
java.lang.String user,
java.lang.String password)
releases a connection back to the pool |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DBConnectionPool getInstance()
public java.sql.Connection acquireConnection(java.lang.String driver, java.lang.String database, java.lang.String user, java.lang.String password) throws DBPoolException
driver
- driver to look fordatabase
- the database to openuser
- the usernamepassword
- the password.
DBPoolException
public java.sql.Connection acquireConnection(java.lang.String driver, java.lang.String database, java.util.Properties properties) throws DBPoolException
driver
- driver to look fordatabase
- the database to openproperties
- the properties of the database
DBPoolException
public void releaseConnection(java.sql.Connection con, java.lang.String driver, java.lang.String database, java.lang.String user, java.lang.String password) throws DBPoolException
con
- connections to be releaseddriver
- driver to look fordatabase
- the database to openuser
- the usernamepassword
- the password.
DBPoolException
public void releaseConnection(java.sql.Connection con, java.lang.String driver, java.lang.String database, java.util.Properties properties) throws java.lang.Exception
con
- connections to be releaseddriver
- driver to look fordatabase
- the database to openproperties
- containing username and password.
java.lang.Exception
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org