Top Description Fields Constructors Methods
org.apache.derby.jdbc

public Class ClientXADataSource

extends ClientDataSource
implements ClientXADataSourceInterface
Class Inheritance
All Implemented Interfaces
org.apache.derby.client.ClientXADataSourceInterface, javax.sql.XADataSource, javax.sql.CommonDataSource, org.apache.derby.client.ClientDataSourceInterface, javax.sql.DataSource, java.sql.Wrapper
Known Direct Subclasses
org.apache.derby.jdbc.ClientXADataSource40
Imports
java.sql.ShardingKeyBuilder, .SQLException, .SQLFeatureNotSupportedException, .SQLException, javax.sql.XAConnection, org.apache.derby.client.ClientXADataSourceInterface

This datasource is suitable for a client/server use of Derby, running on full Java SE 6 and higher, corresponding to JDBC 4.0 and higher.

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.

ClientXADataSource automatically supports the correct JDBC specification version for the Java Virtual Machine's environment.

ClientXADataSource is serializable and referenceable.

See ClientDataSource for DataSource properties.

Field Summary

Modifier and TypeField and Description
public static final String
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ShardingKeyBuilder
public XAConnection
getXAConnection()

Implements javax.sql.XADataSource.getXAConnection.

Attempts to establish a physical database connection that can be used in a distributed transaction.
public XAConnection
getXAConnection(String
the database user on whose behalf the connection is being made
user
,
String
the user's password
password
)

Implements javax.sql.XADataSource.getXAConnection.

Attempts to establish a physical database connection, using the given user name and password.
Inherited from org.apache.derby.jdbc.ClientDataSource:
getReference

Field Detail

className__back to summary
public static final String className__

Hides org.apache.derby.jdbc.ClientDataSource.className__.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.apache.derby.jdbc.ClientDataSource.serialVersionUID.

Constructor Detail

ClientXADataSourceback to summary
public ClientXADataSource()

Method Detail

createShardingKeyBuilderback to summary
public ShardingKeyBuilder createShardingKeyBuilder() throws SQLException

Overrides default org.apache.derby.client.ClientXADataSourceInterface.createShardingKeyBuilder, javax.sql.CommonDataSource.createShardingKeyBuilder.

Added by Java 9

Returns:ShardingKeyBuilder

Doc from javax.sql.CommonDataSource.createShardingKeyBuilder.

The ShardingKeyBuilder instance that was created

Exceptions
SQLException:

Doc from javax.sql.CommonDataSource.createShardingKeyBuilder.

if an error occurs creating the builder

getXAConnectionback to summary
public XAConnection getXAConnection() throws SQLException

Implements javax.sql.XADataSource.getXAConnection.

Doc from javax.sql.XADataSource.getXAConnection.

Attempts to establish a physical database connection that can be used in a distributed transaction.

Returns:XAConnection

an XAConnection object, which represents a physical connection to a data source, that can be used in a distributed transaction

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs
getXAConnectionback to summary
public XAConnection getXAConnection(String user, String password) throws SQLException

Implements javax.sql.XADataSource.getXAConnection.

Doc from javax.sql.XADataSource.getXAConnection.

Attempts to establish a physical database connection, using the given user name and password. The connection that is returned is one that can be used in a distributed transaction.

Parameters
user:String

the database user on whose behalf the connection is being made

password:String

the user's password

Returns:XAConnection

an XAConnection object, which represents a physical connection to a data source, that can be used in a distributed transaction

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs