JDBCXADataSource (HSQLDB 2.4.0 API)
Date: 2017-04-09

org.hsqldb.jdbc.pool

## Class JDBCXADataSource

- java.lang.Object
- - org.hsqldb.jdbc.JDBCCommonDataSource
  - - org.hsqldb.jdbc.pool.JDBCXADataSource

- All Implemented Interfaces:
    Serializable, Referenceable, CommonDataSource, XADataSource

      public class JDBCXADataSource
      extends JDBCCommonDataSource
      implements XADataSource, Serializable, Referenceable, CommonDataSource

  Connection factory for JDBCXAConnections. For use by XA data source factories, not by end users.

  The `JDBCDataSourceFactory` can be used to get instances of this class.

  The methods of the superclass, `JDBCCommonDataSource`, are used for settings the HyperSQL server and user.

  Since:
    2.0.0
  Author:
    Blaine Simpson (blaine dot simpson at admc dot com)
  See Also:
    `XADataSource`, `JDBCXAConnection`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JDBCXADataSource()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addResource(Xid xid, JDBCXAResource xaResource)`
    `Reference` | `getReference()` Retrieves the Reference of this object.
    `XAConnection` | `getXAConnection()` Get new XAConnection connection, to be managed by a connection manager.
    `XAConnection` | `getXAConnection(String user, String password)` Gets a new XAConnection after validating the given username and password.
    `JDBCXAResource` | `removeResource(Xid xid)`

    - ### Methods inherited from class org.hsqldb.jdbc.JDBCCommonDataSource

      `getDatabase, getDatabaseName, getDataSourceName, getDescription, getLoginTimeout, getLogWriter, getNetworkProtocol, getParentLogger, getServerName, getUrl, getURL, getUser, setDatabase, setDatabaseName, setLoginTimeout, setLogWriter, setPassword, setProperties, setUrl, setURL, setUser`

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

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

    - ### Methods inherited from interface javax.sql.CommonDataSource

      `getLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriter`

- - ### Constructor Detail

    - #### JDBCXADataSource

          public JDBCXADataSource()
                           throws SQLException

      Throws:
        `SQLException`

  - ### Method Detail

    - #### getXAConnection

          public XAConnection getXAConnection()
                                       throws SQLException

      Get new XAConnection connection, to be managed by a connection manager.
      Specified by:
        `getXAConnection` in interface `XADataSource`
      Throws:
        `SQLException` - on error

    - #### getXAConnection

          public XAConnection getXAConnection(String user,
                                              String password)
                                       throws SQLException

      Gets a new XAConnection after validating the given username and password.
      Specified by:
        `getXAConnection` in interface `XADataSource`
      Parameters:
        `user` - String which must match the 'user' configured for this JDBCXADataSource.
        `password` - String which must match the 'password' configured for this JDBCXADataSource.
        `user` - the user
        `password` - the password
      Throws:
        `SQLException` - on error
      See Also:
        `getXAConnection()`

    - #### getReference

          public Reference getReference()
                                 throws NamingException

      Retrieves the Reference of this object.
      Specified by:
        `getReference` in interface `Referenceable`
      Returns:
        The non-null javax.naming.Reference of this object.
      Throws:
        `NamingException` - If a naming exception was encountered while retrieving the reference.

    - #### addResource

          public void addResource(Xid xid,
                                  JDBCXAResource xaResource)

    - #### removeResource

          public JDBCXAResource removeResource(Xid xid)

Copyright © 2001 - 2017 HSQL Development Group.