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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addResource
(Xid xid, JDBCXAResource xaResource) Retrieves the Reference of this object.Get new XAConnection connection, to be managed by a connection manager.getXAConnection
(String user, String password) Gets a new XAConnection after validating the given username and password.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
createShardingKeyBuilder, getParentLogger
Methods inherited from interface javax.sql.XADataSource
createXAConnectionBuilder, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
-
Constructor Details
-
JDBCXADataSource
- Throws:
SQLException
-
-
Method Details
-
getXAConnection
Get new XAConnection connection, to be managed by a connection manager.- Specified by:
getXAConnection
in interfaceXADataSource
- Throws:
SQLException
- on error
-
getXAConnection
Gets a new XAConnection after validating the given username and password.- Specified by:
getXAConnection
in interfaceXADataSource
- Parameters:
user
- String which must match the 'user' configured for this JDBCXADataSource.password
- String which must match the 'password' configured for this JDBCXADataSource.- Throws:
SQLException
- on error- See Also:
-
getReference
Retrieves the Reference of this object.- Specified by:
getReference
in interfaceReferenceable
- Returns:
- The non-null javax.naming.Reference of this object.
- Throws:
NamingException
- If a naming exception was encountered while retrieving the reference.
-
addResource
-
removeResource
-