JtdsXAConnection (jTDS API)
Keywords: net.sourceforge.jtds.jdbcx.JtdsXAConnection class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sourceforge.jtds.jdbcx
Class JtdsXAConnection

    java.lang.Object
      net.sourceforge.jtds.jdbcx.PooledConnection
          net.sourceforge.jtds.jdbcx.JtdsXAConnection

All Implemented Interfaces:
  javax.sql.PooledConnection, javax.sql.XAConnection

public class JtdsXAConnection
extends PooledConnection
implements javax.sql.XAConnection

jTDS implementation of the `XAConnection` interface.

Version:
  $Id: JtdsXAConnection.java,v 1.4 2005/04/28 14:29:30 alin_sinpalean Exp $

Field Summary
`private JtdsDataSource` | `dataSource`
`private javax.transaction.xa.XAResource` | `resource` The XAResource used by the transaction manager to control this connection.
`private int` | `xaConnectionId`

Fields inherited from class net.sourceforge.jtds.jdbcx.PooledConnection
`connection`

Constructor Summary
`JtdsXAConnection(JtdsDataSource dataSource, java.sql.Connection connection)` Construct a new `XAConnection` object.

Method Summary
`void` | `close()` Closes the database connection.
`(package private) int` | `getXAConnectionID()` Retrieves the XA Connection ID to pass to server.
`protected JtdsDataSource` | `getXADataSource()`
`javax.transaction.xa.XAResource` | `getXAResource()`

Methods inherited from class net.sourceforge.jtds.jdbcx.PooledConnection
`addConnectionEventListener, fireConnectionEvent, getConnection, removeConnectionEventListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.sql.PooledConnection
`addConnectionEventListener, getConnection, removeConnectionEventListener`

Field Detail

### resource

    private final javax.transaction.xa.XAResource resource

  The XAResource used by the transaction manager to control this connection.

### dataSource

    private final JtdsDataSource dataSource

### xaConnectionId

    private final int xaConnectionId

Constructor Detail

### JtdsXAConnection

    public JtdsXAConnection(JtdsDataSource dataSource,
                            java.sql.Connection connection)
                     throws java.sql.SQLException

  Construct a new `XAConnection` object.

Parameters:
  `dataSource` - the parent `DataSource` object
  `connection` - the real database connection

Method Detail

### getXAConnectionID

    int getXAConnectionID()

  Retrieves the XA Connection ID to pass to server.

  Returns:
    the XA connection ID as an `Integer`

### getXAResource

    public javax.transaction.xa.XAResource getXAResource()
                                                  throws java.sql.SQLException

  Specified by:
    `getXAResource` in interface `javax.sql.XAConnection`
  Throws:
    `java.sql.SQLException`

### close

    public void close()
               throws java.sql.SQLException

  Description copied from class: `PooledConnection`
  Closes the database connection.

  Specified by:
    `close` in interface `javax.sql.PooledConnection`
  Overrides:
    `close` in class `PooledConnection`
  Throws:
    `java.sql.SQLException` - if an error occurs

### getXADataSource

    protected JtdsDataSource getXADataSource()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Generated on December 30 2009