Package org.apache.derby.jdbc
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 ResourceAdapter
link to the databaseprivate static final long
Fields inherited from class org.apache.derby.jdbc.BasicEmbeddedDataSource40
attributesAsPassword, connectionAttributes, createDatabase, databaseName, dataSourceName, description, driver, jdbcurl, loginTimeout, shutdownDatabase
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate XAConnection
createXAConnection
(ResourceAdapter ra, String user, String password, boolean requestPassword) Instantiate and return an EmbedXAConnection from this instance of EmbeddedXADataSource.final XAConnection
final XAConnection
getXAConnection
(String user, 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
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
Methods inherited from interface javax.sql.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:
getXAConnection
in interfaceXADataSource
- Throws:
SQLException
-
getXAConnection
- Specified by:
getXAConnection
in interfaceXADataSource
- Throws:
SQLException
-
update
protected void update()UpdateBasicEmbeddedDataSource40.jdbcurl
from attributes set. Also clearsra
.- Overrides:
update
in 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
- @false
if original call is from a no-argument constructor, otherwisetrue
- Returns:
- An XA connection to the database
- Throws:
SQLException
-
getResourceAdapter
- Specified by:
getResourceAdapter
in interfaceEmbeddedXADataSourceInterface
- Returns:
- The ResourceAdapter instance for the underlying database
-