com.pivotal.gemfirexd.internal.client

## Class ClientXAConnection

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

All Implemented Interfaces:
  PooledConnection, XAConnection

Direct Known Subclasses:
  ClientXAConnection40

    public abstract class ClientXAConnection
    extends ClientPooledConnection
    implements XAConnection

### Field Summary

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

`logWriter_, rmId_`

### Constructor Summary

Constructors
Constructor and Description
`ClientXAConnection(ClientXADataSource ds, NetLogWriter logWtr, String userId, String password)`

### Method Summary

Methods
`void` `close()` Closes the physical connection to the data source and frees all assoicated resources.
`NetXAConnection` `createControlConnection(NetLogWriter logWriter, String user, String password, ClientDataSource dataSource, int rmId, boolean isXAConn)`
`Connection` `getConnection()` Creates a logical connection.
`ClientXADataSource` `getDataSource()`
`int` `getRmId()`
`XAResource` `getXAResource()`

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

`addConnectionEventListener, finalize, getNetXAConnection, informListeners, isStatementPoolingEnabled, nullLogicalConnection, onStatementClose, onStatementErrorOccurred, 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, addStatementEventListener, removeConnectionEventListener, removeStatementEventListener`

### Constructor Detail

#### ClientXAConnection

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

Throws:
  `SQLException`

### Method Detail

#### getConnection

    public Connection getConnection()
                             throws SQLException

Description copied from class: `ClientPooledConnection`
Creates a logical connection.

This is the standard API for getting a logical connection handle for a pooled connection. No "resettable" properties are passed, so user, password, and all other properties may not change.

Specified by:
  `getConnection` in interface `PooledConnection`
Overrides:
  `getConnection` in class `ClientPooledConnection`
Throws:
  `SQLException` - if creating a new logical connection fails

#### getRmId

    public int getRmId()

#### getXAResource

    public XAResource getXAResource()
                             throws SQLException

Specified by:
  `getXAResource` in interface `XAConnection`
Throws:
  `SQLException`

#### getDataSource

    public ClientXADataSource getDataSource()
                                     throws SqlException

Throws:
  `SqlException`

#### createControlConnection

    public NetXAConnection createControlConnection(NetLogWriter logWriter,
                                          String user,
                                          String password,
                                          ClientDataSource dataSource,
                                          int rmId,
                                          boolean isXAConn)
                                            throws SQLException

Throws:
  `SQLException`

#### close

    public void close()
               throws SQLException

Description copied from class: `ClientPooledConnection`
Closes the physical connection to the data source and frees all assoicated resources.

Specified by:
  `close` in interface `PooledConnection`
Overrides:
  `close` in class `ClientPooledConnection`
Throws:
  `SQLException` - if closing the connection causes an error. Note that this connection can still be considered closed even if an error occurs.