org.hsqldb.jdbc.pool

## Class JDBCXADataSource

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

- All Implemented Interfaces:
    java.io.Serializable, javax.naming.Referenceable, javax.sql.CommonDataSource, javax.sql.XADataSource

      public class JDBCXADataSource
      extends JDBCCommonDataSource
      implements javax.sql.XADataSource, java.io.Serializable, javax.naming.Referenceable, javax.sql.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(javax.transaction.xa.Xid xid, JDBCXAResource xaResource)`
    `javax.naming.Reference` | `getReference()` Retrieves the Reference of this object.
    `javax.sql.XAConnection` | `getXAConnection()` Get new XAConnection connection, to be managed by a connection manager.
    `javax.sql.XAConnection` | `getXAConnection(java.lang.String user, java.lang.String password)` Gets a new XAConnection after validating the given username and password.
    `JDBCXAResource` | `removeResource(javax.transaction.xa.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 java.sql.SQLException

      Throws:
        `java.sql.SQLException`

  - ### Method Detail

    - #### getXAConnection

          public javax.sql.XAConnection getXAConnection()
                                                 throws java.sql.SQLException

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

    - #### getXAConnection

          public javax.sql.XAConnection getXAConnection(java.lang.String user,
                                                        java.lang.String password)
                                                 throws java.sql.SQLException

      Gets a new XAConnection after validating the given username and password.
      Specified by:
        `getXAConnection` in interface `javax.sql.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:
        `java.sql.SQLException` - on error
      See Also:
        `getXAConnection()`

    - #### getReference

          public javax.naming.Reference getReference()
                                              throws javax.naming.NamingException

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

    - #### addResource

          public void addResource(javax.transaction.xa.Xid xid,
                                  JDBCXAResource xaResource)

    - #### removeResource

          public JDBCXAResource removeResource(javax.transaction.xa.Xid xid)

Copyright © 2001 - 2018 HSQL Development Group.