org.apache.derby.jdbc
Class BasicEmbeddedXADataSource40

java.lang.Object
  extended by org.apache.derby.jdbc.EmbeddedBaseDataSource
      extended by org.apache.derby.jdbc.BasicEmbeddedDataSource40
          extended by 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 datasource 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:
EmbeddedXADataSource40, Serialized Form

Field Summary
private  ResourceAdapter ra
           
private static long serialVersionUID
           
 
Fields inherited from class org.apache.derby.jdbc.EmbeddedBaseDataSource
attributesAsPassword, connectionAttributes, createDatabase, databaseName, dataSourceName, description, driver, jdbcurl, loginTimeout, shutdownDatabase
 
Constructor Summary
BasicEmbeddedXADataSource40()
           
 
Method Summary
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()
           
 
Methods inherited from class org.apache.derby.jdbc.BasicEmbeddedDataSource40
getParentLogger
 
Methods inherited from class org.apache.derby.jdbc.EmbeddedBaseDataSource
equals, findDriver, getAttributesAsPassword, getConnection, 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, unwrap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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 javax.sql.DataSource
getConnection, getConnection
 
Methods inherited from interface javax.sql.CommonDataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

ra

private transient ResourceAdapter ra
Constructor Detail

BasicEmbeddedXADataSource40

public BasicEmbeddedXADataSource40()
Method Detail

getXAConnection

public final javax.sql.XAConnection getXAConnection()
                                             throws java.sql.SQLException
Specified by:
getXAConnection in interface javax.sql.XADataSource
Throws:
java.sql.SQLException
See Also:
XADataSource.getXAConnection()

getXAConnection

public final javax.sql.XAConnection getXAConnection(java.lang.String user,
                                                    java.lang.String password)
                                             throws java.sql.SQLException
Specified by:
getXAConnection in interface javax.sql.XADataSource
Throws:
java.sql.SQLException
See Also:
XADataSource.getXAConnection(String, String)

update

protected void update()
Overrides:
update in class EmbeddedBaseDataSource

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.

Parameters:
user -
password -
Returns:
XAConnection
Throws:
java.sql.SQLException - if a connection can't be created

getResourceAdapter

public ResourceAdapter getResourceAdapter()
Specified by:
getResourceAdapter in interface EmbeddedXADataSourceInterface
Returns:
The ResourceAdapter instance for the underlying database

Built on Wed 2013-06-12 15:21:56+0000, from revision ???

Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.