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
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()
public void addStatementEventListener(StatementEventListener listener)
addStatementEventListener
in interface PooledConnection
public void removeStatementEventListener(StatementEventListener listener)
removeStatementEventListener
in interface PooledConnection
Copyright © 2001–2018 Apache Cayenne. All rights reserved.