|
||||||||||
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(javax.sql.DataSource connectionSource,
java.lang.String userName,
java.lang.String password)
Creates new PooledConnection |
Method Summary | |
---|---|
void |
addConnectionEventListener(javax.sql.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(java.sql.SQLException exception)
This method creates and sents an event to listeners when an error occurs in the underlying connection. |
java.sql.Connection |
getConnection()
|
void |
reconnect()
|
void |
removeConnectionEventListener(javax.sql.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(javax.sql.DataSource connectionSource, java.lang.String userName, java.lang.String password)
Method Detail |
---|
public void reconnect() throws java.sql.SQLException
java.sql.SQLException
public void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
addConnectionEventListener
in interface javax.sql.PooledConnection
public void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
removeConnectionEventListener
in interface javax.sql.PooledConnection
public void close() throws java.sql.SQLException
close
in interface javax.sql.PooledConnection
java.sql.SQLException
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.PooledConnection
java.sql.SQLException
protected void returnConnectionToThePool() throws java.sql.SQLException
java.sql.SQLException
public void connectionErrorNotification(java.sql.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 |