This data source is suitable for an application using embedded Derby, running on full Java SE 6 or higher, corresponding to JDBC 4.0 and higher. EmbeddedXADataSource is an XADataSource implementation.
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.
Use BasicEmbeddedXADataSource40 if your application runs on Java 8 Compact Profile 2.
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.
| Modifier and Type | Field and Description |
|---|---|
| private transient ResourceAdapter | ra
A cached link to the database, set up with the first connection is made. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private XAConnection | Returns: An XA connection to the databaseThe resource adapter to the database ra, String The user name user, String The password password, boolean @ requestPassword)false if original call is from a
no-argument constructor, otherwise trueInstantiate and return an EmbedXAConnection from this instance of EmbeddedXADataSource. |
| public ResourceAdapter | Returns: The cachedResourceAdapter instance for the underlying
databaseImplements org. |
| public final XAConnection | Returns: a Connection to the databaseImplements javax. |
| public final XAConnection | Returns: a Connection to the databasethe database user on whose behalf the Connection is being made user, String the user's password password)Implements javax. |
| protected void | update()
Overrides org. jdbcurl from attributes set.
|
| ra | back to summary |
|---|---|
| private transient ResourceAdapter ra A cached link to the database, set up with the first connection is made. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. | |
| EmbeddedXADataSource | back to summary |
|---|---|
| public EmbeddedXADataSource() no-arg constructor | |
| createXAConnection | back to summary |
|---|---|
| private XAConnection createXAConnection(ResourceAdapter ra, String user, String password, boolean requestPassword) throws SQLException Instantiate and return an EmbedXAConnection from this instance of EmbeddedXADataSource.
| |
| getResourceAdapter | back to summary |
|---|---|
| public ResourceAdapter getResourceAdapter() Implements org.
| |
| getXAConnection | back to summary |
|---|---|
| public final XAConnection getXAConnection() throws SQLException Implements javax. Attempt to establish a database connection.
| |
| getXAConnection | back to summary |
|---|---|
| public final XAConnection getXAConnection(String user, String password) throws SQLException Implements javax. Attempt to establish a database connection with the given user name and password.
| |
| update | back to summary |
|---|---|
| protected void update() Overrides org. Doc from org. Update
Also clear the cached value of
| |