|
||||||||||
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 |
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)
|
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
SQLException
public void addConnectionEventListener(ConnectionEventListener listener)
addConnectionEventListener
in interface PooledConnection
public void removeConnectionEventListener(ConnectionEventListener listener)
removeConnectionEventListener
in interface PooledConnection
public void close() throws SQLException
close
in interface PooledConnection
SQLException
public Connection getConnection() throws SQLException
getConnection
in interface PooledConnection
SQLException
protected void returnConnectionToThePool() throws SQLException
SQLException
public void connectionErrorNotification(SQLException exception)
protected void connectionClosedNotification()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |