Class BasicEmbeddedXADataSource40
java.lang.Object
org.apache.derby.jdbc.BasicEmbeddedDataSource40
org.apache.derby.jdbc.BasicEmbeddedXADataSource40
- All Implemented Interfaces:
Serializable, Wrapper, CommonDataSource, DataSource, XADataSource, EmbeddedDataSourceInterface, EmbeddedXADataSourceInterface
public class BasicEmbeddedXADataSource40
extends BasicEmbeddedDataSource40
implements EmbeddedXADataSourceInterface, 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 implement
javax.naming.Referenceable.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ResourceAdapterlink to the databaseprivate static final longFields inherited from class BasicEmbeddedDataSource40
attributesAsPassword, connectionAttributes, createDatabase, databaseName, dataSourceName, description, driver, jdbcurl, loginTimeout, shutdownDatabase -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate XAConnectioncreateXAConnection(ResourceAdapter ra, String user, String password, boolean requestPassword) Instantiate and return an EmbedXAConnection from this instance of EmbeddedXADataSource.final XAConnectionfinal XAConnectiongetXAConnection(String user, String password) protected voidupdate()UpdateBasicEmbeddedDataSource40.jdbcurlfrom attributes set.Methods inherited from class 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, unwrapMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CommonDataSource
createShardingKeyBuilder, getParentLoggerMethods inherited from interface DataSource
createConnectionBuilder, getConnection, getConnection, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriterMethods inherited from interface EmbeddedDataSourceInterface
getAttributesAsPassword, getConnectionAttributes, getCreateDatabase, getDatabaseName, getDataSourceName, getDescription, getPassword, getShutdownDatabase, getUser, setAttributesAsPassword, setConnectionAttributes, setCreateDatabase, setDatabaseName, setDataSourceName, setDescription, setPassword, setShutdownDatabase, setUserMethods inherited from interface Wrapper
isWrapperFor, unwrapMethods inherited from interface XADataSource
createXAConnectionBuilder, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
ra
link to the database
-
-
Constructor Details
-
BasicEmbeddedXADataSource40
public BasicEmbeddedXADataSource40()Constructs a basic embedded XA data source. See the class Javadoc.
-
-
Method Details
-
getXAConnection
- Specified by:
getXAConnectionin interfaceXADataSource- Throws:
SQLException
-
getXAConnection
- Specified by:
getXAConnectionin interfaceXADataSource- Throws:
SQLException
-
update
protected void update()UpdateBasicEmbeddedDataSource40.jdbcurlfrom attributes set. Also clearsra.- Overrides:
updatein classBasicEmbeddedDataSource40
-
createXAConnection
private XAConnection createXAConnection(ResourceAdapter ra, String user, String password, boolean requestPassword) throws 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- @falseif original call is from a no-argument constructor, otherwisetrue- Returns:
- An XA connection to the database
- Throws:
SQLException
-
getResourceAdapter
- Specified by:
getResourceAdapterin interfaceEmbeddedXADataSourceInterface- Returns:
- The ResourceAdapter instance for the underlying database
-