|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensolaris.opengrok.jdbc.ConnectionManager
public class ConnectionManager
Class that manages the pool of database connections.
| Constructor Summary | |
|---|---|
ConnectionManager(java.lang.String driverClass,
java.lang.String url)
Create a new ConnectionManager instance. |
|
| Method Summary | |
|---|---|
ConnectionResource |
getConnectionResource()
Get a ConnectionResource object from the pool, or create a
new one if the pool is empty. |
void |
releaseConnection(ConnectionResource cr)
Return a ConnectionResource back to the pool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionManager(java.lang.String driverClass,
java.lang.String url)
throws java.lang.ClassNotFoundException
ConnectionManager instance.
driverClass - the name of the JDBC driver classurl - the JDBC connection URL to the database
java.lang.ClassNotFoundException - if the JDBC driver class cannot be found| Method Detail |
|---|
public ConnectionResource getConnectionResource()
throws java.sql.SQLException
ConnectionResource object from the pool, or create a
new one if the pool is empty. Callers should make sure that the object
is returned to the pool by calling
releaseConnection(ConnectionResource) after they are finished
with it.
ConnectionResource object
java.sql.SQLException - if a database error occurs
public void releaseConnection(ConnectionResource cr)
throws java.sql.SQLException
ConnectionResource back to the pool.
cr -
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||