com.pivotal.gemfirexd.internal.client

## Class ClientXAConnection40

- java.lang.Object
- - com.pivotal.gemfirexd.internal.client.ClientPooledConnection
  - - com.pivotal.gemfirexd.internal.client.ClientXAConnection
    - - com.pivotal.gemfirexd.internal.client.ClientXAConnection40

All Implemented Interfaces:
  PooledConnection, XAConnection

    public class ClientXAConnection40
    extends ClientXAConnection

jdbc4.0 implementation of XAConnection

### Field Summary

### Fields inherited from class com.pivotal.gemfirexd.internal.client.ClientPooledConnection

`logWriter_, rmId_`

### Constructor Summary

Constructors
Constructor and Description
`ClientXAConnection40(ClientXADataSource ds, NetLogWriter logWtr, String userId, String password)` Constructor for ClientXAConnection40.

### Method Summary

Methods
`void` `addStatementEventListener(StatementEventListener listener)` Registers a `StatementEventListener` with this `PooledConnection` object.
`void` `onStatementClose(PreparedStatement statement)` Raise the statementClosed event for all the listeners when the corresponding events occurs
`void` `onStatementErrorOccurred(PreparedStatement statement, SQLException sqle)` Raise the statementErrorOccurred event for all the listeners when the corresponding events occurs.
`void` `removeStatementEventListener(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.

### Methods inherited from class com.pivotal.gemfirexd.internal.client.ClientXAConnection

`close, createControlConnection, getConnection, getDataSource, getRmId, getXAResource`

### Methods inherited from class com.pivotal.gemfirexd.internal.client.ClientPooledConnection

`addConnectionEventListener, finalize, getNetXAConnection, informListeners, isStatementPoolingEnabled, nullLogicalConnection, recycleConnection, removeConnectionEventListener`

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface javax.sql.PooledConnection

`addConnectionEventListener, removeConnectionEventListener`

### Constructor Detail

#### ClientXAConnection40

    public ClientXAConnection40(ClientXADataSource ds,
                        NetLogWriter logWtr,
                        String userId,
                        String password)
                         throws SQLException

Constructor for ClientXAConnection40.

Parameters:
  `ds` -
  `logWtr` -
  `userId` -
  `password` -
Throws:
  `SQLException`

### Method Detail

#### removeStatementEventListener

    public void removeStatementEventListener(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.

Parameters:
  `listener` - the component which implements the `StatementEventListener` interface that was previously registered with this `PooledConnection` object

#### addStatementEventListener

    public void addStatementEventListener(StatementEventListener listener)

Registers a `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.

Parameters:
  `listener` - an component which implements the `StatementEventListener` interface that is to be registered with this `PooledConnection` object

#### onStatementClose

    public void onStatementClose(PreparedStatement statement)

Raise the statementClosed event for all the listeners when the corresponding events occurs

Overrides:
  `onStatementClose` in class `ClientPooledConnection`
Parameters:
  `statement` - The PreparedStatement that was closed

#### onStatementErrorOccurred

    public void onStatementErrorOccurred(PreparedStatement statement,
                                SQLException sqle)

Raise the statementErrorOccurred event for all the listeners when the corresponding events occurs.

Overrides:
  `onStatementErrorOccurred` in class `ClientPooledConnection`
Parameters:
  `statement` - The PreparedStatement on which error occurred
  `sqle` - The SQLException associated with the error that caused the invalidation of the PreparedStatements