public class EmbeddedXADataSource extends EmbeddedDataSource implements org.apache.derby.jdbc.EmbeddedXADataSourceInterface
An XADataSource is a factory for XAConnection objects. It represents a RM in a DTP environment. An object that implements the XADataSource interface is typically registered with a JNDI service provider.
EmbeddedXADataSource automatically supports the correct JDBC specification version for the Java Virtual Machine's environment.
EmbeddedXADataSource object only works on a local database. There is no client/server support. An EmbeddedXADataSource object must live in the same jvm as the database.
EmbeddedXADataSource is serializable and referenceable.
See EmbeddedDataSource for DataSource properties.
| Constructor and Description |
|---|
EmbeddedXADataSource()
no-arg constructor
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.derby.iapi.jdbc.ResourceAdapter |
getResourceAdapter() |
javax.sql.XAConnection |
getXAConnection()
Attempt to establish a database connection.
|
javax.sql.XAConnection |
getXAConnection(java.lang.String user,
java.lang.String password)
Attempt to establish a database connection with the given user
name and password.
|
protected void |
update() |
getReferenceequals, getAttributesAsPassword, getConnection, getConnection, getConnectionAttributes, getCreateDatabase, getDatabaseName, getDataSourceName, getDescription, getLoginTimeout, getLogWriter, getPassword, getShortDatabaseName, getShutdownDatabase, getUser, isWrapperFor, setAttributesAsPassword, setConnectionAttributes, setCreateDatabase, setDatabaseName, setDataSourceName, setDescription, setLoginTimeout, setLogWriter, setPassword, setShutdownDatabase, setupResourceAdapter, setUser, unwrapclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAttributesAsPassword, getConnectionAttributes, getCreateDatabase, getDatabaseName, getDataSourceName, getDescription, getPassword, getShutdownDatabase, getUser, setAttributesAsPassword, setConnectionAttributes, setCreateDatabase, setDatabaseName, setDataSourceName, setDescription, setPassword, setShutdownDatabase, setUserpublic final javax.sql.XAConnection getXAConnection()
throws java.sql.SQLException
getXAConnection in interface javax.sql.XADataSourcejava.sql.SQLException - if a database-access error occurs.public final javax.sql.XAConnection getXAConnection(java.lang.String user,
java.lang.String password)
throws java.sql.SQLException
getXAConnection in interface javax.sql.XADataSourceuser - the database user on whose behalf the Connection is being madepassword - the user's passwordjava.sql.SQLException - if a database-access error occurs.protected void update()
update in class org.apache.derby.jdbc.EmbeddedBaseDataSourcepublic org.apache.derby.iapi.jdbc.ResourceAdapter getResourceAdapter()
getResourceAdapter in interface org.apache.derby.jdbc.EmbeddedXADataSourceInterfaceApache Derby 10.10 API Documentation - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.