|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsqlg2.db.SingleConnectionManager
public class SingleConnectionManager
Single-connection implementation of ConnectionManager.
This class is thread-safe and when one thread is using connection
others have to wait.
| Constructor Summary | |
|---|---|
SingleConnectionManager(java.sql.Connection conn)
|
|
| Method Summary | |
|---|---|
java.sql.Connection |
allocConnection(boolean simpleTransaction)
Connection allocation. |
void |
close()
Closing all connections and releasing all resources. |
void |
releaseConnection(java.sql.Connection conn)
Connection release. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingleConnectionManager(java.sql.Connection conn)
| Method Detail |
|---|
public java.sql.Connection allocConnection(boolean simpleTransaction)
throws java.sql.SQLException
ConnectionManager
allocConnection in interface ConnectionManagersimpleTransaction - true if connection is allocated for simple transaction. Can be used
to prevent deadlocks between transactions.
java.sql.SQLExceptionpublic void releaseConnection(java.sql.Connection conn)
ConnectionManager
releaseConnection in interface ConnectionManager
public void close()
throws java.sql.SQLException
ConnectionManager
close in interface ConnectionManagerjava.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||