|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.conn.PooledConnectionImpl
public class PooledConnectionImpl
PooledConnectionImpl is an implementation of a pooling wrapper for the database connection as per JDBC3 spec. Most of the modern JDBC drivers should have its own implementation that may be used instead of this class.
| Constructor Summary | |
|---|---|
protected |
PooledConnectionImpl()
|
|
PooledConnectionImpl(DataSource connectionSource,
String userName,
String password)
Creates new PooledConnection |
| Method Summary | |
|---|---|
void |
addConnectionEventListener(ConnectionEventListener listener)
|
void |
addStatementEventListener(StatementEventListener listener)
|
void |
close()
|
protected void |
connectionClosedNotification()
Creates and sends an event to listeners when a user closes java.sql.Connection object belonging to this PooledConnection. |
void |
connectionErrorNotification(SQLException exception)
This method creates and sents an event to listeners when an error occurs in the underlying connection. |
Connection |
getConnection()
|
void |
reconnect()
|
void |
removeConnectionEventListener(ConnectionEventListener listener)
|
void |
removeStatementEventListener(StatementEventListener listener)
|
protected void |
returnConnectionToThePool()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected PooledConnectionImpl()
public PooledConnectionImpl(DataSource connectionSource,
String userName,
String password)
| Method Detail |
|---|
public void reconnect()
throws SQLException
SQLExceptionpublic void addConnectionEventListener(ConnectionEventListener listener)
addConnectionEventListener in interface PooledConnectionpublic void removeConnectionEventListener(ConnectionEventListener listener)
removeConnectionEventListener in interface PooledConnection
public void close()
throws SQLException
close in interface PooledConnectionSQLException
public Connection getConnection()
throws SQLException
getConnection in interface PooledConnectionSQLException
protected void returnConnectionToThePool()
throws SQLException
SQLExceptionpublic void connectionErrorNotification(SQLException exception)
protected void connectionClosedNotification()
public void addStatementEventListener(StatementEventListener listener)
public void removeStatementEventListener(StatementEventListener listener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||