com.pivotal.gemfirexd.internal.client

## Class ClientPooledConnection40

- java.lang.Object
- - com.pivotal.gemfirexd.internal.client.ClientPooledConnection
  - - com.pivotal.gemfirexd.internal.client.ClientPooledConnection40

All Implemented Interfaces:
  PooledConnection

    public class ClientPooledConnection40
    extends ClientPooledConnection

The class extends from the ClientPooledConnection class and contains implementations for the JDBC 4.0 specific methods in the javax.sql.PooledConnection interface.

### Field Summary

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

`logWriter_, rmId_`

### Constructor Summary

Constructors
Constructor and Description
`ClientPooledConnection40(ClientBaseDataSource ds, LogWriter logWriter, String user, String password)`
`ClientPooledConnection40(ClientBaseDataSource ds, LogWriter logWriter, String user, String password, int rmId)`

### 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 previously registered listener object from the list of components that would be informed of events with a PreparedStatement object.

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

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

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

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

### Constructor Detail

#### ClientPooledConnection40

    public ClientPooledConnection40(ClientBaseDataSource ds,
                            LogWriter logWriter,
                            String user,
                            String password)
                             throws SQLException

Throws:
  `SQLException`

#### ClientPooledConnection40

    public ClientPooledConnection40(ClientBaseDataSource ds,
                            LogWriter logWriter,
                            String user,
                            String password,
                            int rmId)
                             throws SQLException

Throws:
  `SQLException`

### Method Detail

#### addStatementEventListener

    public void addStatementEventListener(StatementEventListener listener)

Registers a StatementEventListener with this PooledConnection object. Components that wish to be informed of events associated with the PreparedStatement object created by this PooledConnection like the close or error occurred event can register a StatementEventListener with this PooledConnection object.

Parameters:
  `listener` - A component that implements the StatementEventListener interface and wants to be notified of Statement closed or or Statement error occurred events

#### removeStatementEventListener

    public void removeStatementEventListener(StatementEventListener listener)

Removes the specified previously registered listener object from the list of components that would be informed of events with a PreparedStatement object.

Parameters:
  `listener` - The previously registered event listener that needs to be removed from the list of components

#### 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