Class BasicEmbeddedXADataSource40

java.lang.Object
org.apache.derby.jdbc.BasicEmbeddedDataSource40
org.apache.derby.jdbc.BasicEmbeddedXADataSource40
All Implemented Interfaces:
Serializable, Wrapper, CommonDataSource, DataSource, XADataSource

public class BasicEmbeddedXADataSource40 extends BasicEmbeddedDataSource40 implements 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:
  • Constructor Details

    • BasicEmbeddedXADataSource40

      public BasicEmbeddedXADataSource40()
      Constructs a basic embedded XA data source. See the class Javadoc.
  • Method Details

    • getXAConnection

      public final XAConnection getXAConnection() throws SQLException
      Specified by:
      getXAConnection in interface XADataSource
      Throws:
      SQLException
    • getXAConnection

      public final XAConnection getXAConnection(String user, String password) throws SQLException
      Specified by:
      getXAConnection in interface XADataSource
      Throws:
      SQLException
    • getResourceAdapter

      public org.apache.derby.iapi.jdbc.ResourceAdapter getResourceAdapter()
      Returns:
      The ResourceAdapter instance for the underlying database
    • createShardingKeyBuilder

      default ShardingKeyBuilder createShardingKeyBuilder() throws SQLException
      Added by Java 9
      Specified by:
      createShardingKeyBuilder in interface CommonDataSource
      Throws:
      SQLException
    • setDatabaseName

      void setDatabaseName(String databaseName)
    • getDatabaseName

      String getDatabaseName()
    • setDataSourceName

      void setDataSourceName(String dsn)
    • getDataSourceName

      String getDataSourceName()
    • setDescription

      void setDescription(String desc)
    • getDescription

      String getDescription()
    • setUser

      void setUser(String user)
    • getUser

      String getUser()
    • setPassword

      void setPassword(String password)
    • getPassword

      String getPassword()
    • setCreateDatabase

      void setCreateDatabase(String create)
    • getCreateDatabase

      String getCreateDatabase()
    • setConnectionAttributes

      void setConnectionAttributes(String prop)
    • getConnectionAttributes

      String getConnectionAttributes()
    • setShutdownDatabase

      void setShutdownDatabase(String shutdown)
    • getShutdownDatabase

      String getShutdownDatabase()
    • setAttributesAsPassword

      void setAttributesAsPassword(boolean attributesAsPassword)
    • getAttributesAsPassword

      boolean getAttributesAsPassword()
    • getConnection

      Connection getConnection(String username, String password, boolean requestPassword) throws SQLException
      Get a user connection.
      Parameters:
      username - the user name
      password - the password
      requestPassword - true if the password came from the getConnection() call with user and password arguments..
      Returns:
      user connection
      Throws:
      SQLException - on error