public class ClientXAConnection40 extends ClientXAConnection
logicalConnection_, logWriter_, netPhysicalConnection_, netXAPhysicalConnection_, physicalConnection_, rmId_
Constructor and Description |
---|
ClientXAConnection40(ClientXADataSource ds,
NetLogWriter logWtr,
java.lang.String userId,
java.lang.String password)
Constructor for ClientXAConnection40.
|
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
StatementEventListener from the list of
components that will be notified when the driver detects that a
PreparedStatement has been closed or is invalid. |
close, createControlConnection, getConnection, getDataSource, getRmId, getXAResource
addConnectionEventListener, finalize, getNetXAConnection, informListeners, isStatementPoolingEnabled, nullLogicalConnection, recycleConnection, removeConnectionEventListener
public ClientXAConnection40(ClientXADataSource ds, NetLogWriter logWtr, java.lang.String userId, java.lang.String password) throws java.sql.SQLException
ds
- logWtr
- userId
- password
- java.sql.SQLException
public void removeStatementEventListener(javax.sql.StatementEventListener listener)
StatementEventListener
from the list of
components that will be notified when the driver detects that a
PreparedStatement
has been closed or is invalid.
removeStatementEventListener
in interface javax.sql.PooledConnection
removeStatementEventListener
in class ClientPooledConnection
listener
- the component which implements the
StatementEventListener
interface that was previously
registered with this PooledConnection
object
public void addStatementEventListener(javax.sql.StatementEventListener listener)
StatementEventListener
with this PooledConnection
object. Components that
wish to be notified when PreparedStatement
s created by the
connection are closed or are detected to be invalid may use this method
to register a StatementEventListener
with this PooledConnection
object.
addStatementEventListener
in interface javax.sql.PooledConnection
addStatementEventListener
in class ClientPooledConnection
listener
- an component which implements the
StatementEventListener
interface that is to be
registered with this PooledConnection
object
public 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 PreparedStatements