Package org.apache.derby.jdbc
Class BasicEmbeddedXADataSource40
- java.lang.Object
-
- org.apache.derby.jdbc.BasicEmbeddedDataSource40
-
- org.apache.derby.jdbc.BasicEmbeddedXADataSource40
-
- All Implemented Interfaces:
java.io.Serializable
,java.sql.Wrapper
,javax.sql.CommonDataSource
,javax.sql.DataSource
,javax.sql.XADataSource
,EmbeddedDataSourceInterface
,EmbeddedXADataSourceInterface
public class BasicEmbeddedXADataSource40 extends BasicEmbeddedDataSource40 implements EmbeddedXADataSourceInterface, javax.sql.XADataSource
This data source is suitable for an application using embedded Derby, running on Java 8 Compact Profile 2 or higher. BasicEmbeddedXADataSource40 is similar to EmbeddedXADataSource40, except that it does not support JNDI naming, i.e. it does not implementjavax.naming.Referenceable
.- See Also:
EmbeddedXADataSource40
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private ResourceAdapter
ra
link to the databaseprivate static long
serialVersionUID
-
Fields inherited from class org.apache.derby.jdbc.BasicEmbeddedDataSource40
attributesAsPassword, connectionAttributes, createDatabase, databaseName, dataSourceName, description, driver, jdbcurl, loginTimeout, shutdownDatabase
-
-
Constructor Summary
Constructors Constructor Description BasicEmbeddedXADataSource40()
Constructs a basic embedded XA data source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private javax.sql.XAConnection
createXAConnection(ResourceAdapter ra, java.lang.String user, java.lang.String password, boolean requestPassword)
Instantiate and return an EmbedXAConnection from this instance of EmbeddedXADataSource.ResourceAdapter
getResourceAdapter()
javax.sql.XAConnection
getXAConnection()
javax.sql.XAConnection
getXAConnection(java.lang.String user, java.lang.String password)
protected void
update()
UpdateBasicEmbeddedDataSource40.jdbcurl
from attributes set.-
Methods inherited from class org.apache.derby.jdbc.BasicEmbeddedDataSource40
equals, findDriver, getAttributesAsPassword, getConnection, getConnection, getConnection, getConnectionAttributes, getCreateDatabase, getDatabaseName, getDataSourceName, getDescription, getLoginTimeout, getLogWriter, getParentLogger, getPassword, getShutdownDatabase, getUser, hashCode, isWrapperFor, setAttributesAsPassword, setConnectionAttributes, setCreateDatabase, setDatabaseName, setDataSourceName, setDescription, setLoginTimeout, setLogWriter, setPassword, setShutdownDatabase, setupResourceAdapter, setUser, unwrap
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder, getParentLogger
-
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder, getConnection, getConnection, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
-
Methods inherited from interface org.apache.derby.jdbc.EmbeddedDataSourceInterface
getAttributesAsPassword, getConnectionAttributes, getCreateDatabase, getDatabaseName, getDataSourceName, getDescription, getPassword, getShutdownDatabase, getUser, setAttributesAsPassword, setConnectionAttributes, setCreateDatabase, setDatabaseName, setDataSourceName, setDescription, setPassword, setShutdownDatabase, setUser
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
ra
private transient ResourceAdapter ra
link to the database
-
-
Method Detail
-
getXAConnection
public final javax.sql.XAConnection getXAConnection() throws java.sql.SQLException
- Specified by:
getXAConnection
in interfacejavax.sql.XADataSource
- Throws:
java.sql.SQLException
-
getXAConnection
public final javax.sql.XAConnection getXAConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
- Specified by:
getXAConnection
in interfacejavax.sql.XADataSource
- Throws:
java.sql.SQLException
-
update
protected void update()
UpdateBasicEmbeddedDataSource40.jdbcurl
from attributes set. Also clearsra
.- Overrides:
update
in classBasicEmbeddedDataSource40
-
createXAConnection
private javax.sql.XAConnection createXAConnection(ResourceAdapter ra, java.lang.String user, java.lang.String password, boolean requestPassword) throws java.sql.SQLException
Instantiate and return an EmbedXAConnection from this instance of EmbeddedXADataSource. Minion method.- Parameters:
ra
- The resource adapter for this databaseuser
- The user namepassword
- The passwordrequestPassword
-- Returns:
- An XA connection to the database
- Throws:
java.sql.SQLException
-
getResourceAdapter
public ResourceAdapter getResourceAdapter()
- Specified by:
getResourceAdapter
in interfaceEmbeddedXADataSourceInterface
- Returns:
- The ResourceAdapter instance for the underlying database
-
-