public class PooledConnectionImpl extends Object implements PooledConnection
| Modifier | Constructor and Description |
|---|---|
protected |
PooledConnectionImpl() |
|
PooledConnectionImpl(DataSource connectionSource,
String userName,
String password)
Creates new PooledConnection
|
| Modifier and Type | Method and Description |
|---|---|
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() |
protected PooledConnectionImpl()
public PooledConnectionImpl(DataSource connectionSource, String userName, String password)
public void reconnect()
throws SQLException
SQLExceptionpublic void addConnectionEventListener(ConnectionEventListener listener)
addConnectionEventListener in interface PooledConnectionpublic void removeConnectionEventListener(ConnectionEventListener listener)
removeConnectionEventListener in interface PooledConnectionpublic void close()
throws SQLException
close in interface PooledConnectionSQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface PooledConnectionSQLExceptionprotected void returnConnectionToThePool()
throws SQLException
SQLExceptionpublic void connectionErrorNotification(SQLException exception)
protected void connectionClosedNotification()
public void addStatementEventListener(StatementEventListener listener)
addStatementEventListener in interface PooledConnectionpublic void removeStatementEventListener(StatementEventListener listener)
removeStatementEventListener in interface PooledConnectionCopyright © 2001–2018 Apache Cayenne. All rights reserved.