public class ClientPooledConnection40 extends ClientPooledConnection
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.CopyOnWriteArrayList<javax.sql.StatementEventListener> |
statementEventListeners
List of statement event listeners.
|
logicalConnection_, logWriter_, netPhysicalConnection_, netXAPhysicalConnection_, physicalConnection_, rmId_
Constructor and Description |
---|
ClientPooledConnection40(ClientBaseDataSourceRoot ds,
LogWriter logWriter,
java.lang.String user,
java.lang.String password) |
ClientPooledConnection40(ClientBaseDataSourceRoot ds,
LogWriter logWriter,
java.lang.String user,
java.lang.String password,
int rmId) |
Modifier and Type | Method and Description |
---|---|
void |
addStatementEventListener(javax.sql.StatementEventListener listener)
Registers a StatementEventListener with this PooledConnection object.
|
void |
onStatementClose(java.sql.PreparedStatement statement)
Raise the statementClosed event for all the listeners when the
corresponding events occurs.
|
void |
onStatementErrorOccurred(java.sql.PreparedStatement statement,
java.sql.SQLException sqle)
Raise the statementErrorOccurred event for all the listeners when the
corresponding events occurs.
|
void |
removeStatementEventListener(javax.sql.StatementEventListener listener)
Removes the specified previously registered listener object from the list
of components that would be informed of events with a PreparedStatement
object.
|
addConnectionEventListener, close, finalize, getConnection, getNetXAConnection, informListeners, isStatementPoolingEnabled, nullLogicalConnection, recycleConnection, removeConnectionEventListener
private final java.util.concurrent.CopyOnWriteArrayList<javax.sql.StatementEventListener> statementEventListeners
public ClientPooledConnection40(ClientBaseDataSourceRoot ds, LogWriter logWriter, java.lang.String user, java.lang.String password) throws java.sql.SQLException
java.sql.SQLException
public ClientPooledConnection40(ClientBaseDataSourceRoot ds, LogWriter logWriter, java.lang.String user, java.lang.String password, int rmId) throws java.sql.SQLException
java.sql.SQLException
public void addStatementEventListener(javax.sql.StatementEventListener listener)
listener
- A component that implements the StatementEventListener
interface and wants to be notified of Statement closed or
or Statement error occurred eventspublic void removeStatementEventListener(javax.sql.StatementEventListener listener)
listener
- The previously registered event listener that needs to be
removed from the list of componentspublic void onStatementClose(java.sql.PreparedStatement statement)
onStatementClose
in class ClientPooledConnection
statement
- The PreparedStatement that was closedpublic void onStatementErrorOccurred(java.sql.PreparedStatement statement, java.sql.SQLException sqle)
onStatementErrorOccurred
in class ClientPooledConnection
statement
- The PreparedStatement on which error occurredsqle
- The SQLException associated with the error that
caused the invalidation of the PreparedStatementsApache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.