Top Fields Constructors Methods
org.apache.derby.client.net

public Class NetXAConnection

extends Object
Class Inheritance
Imports
javax.transaction.xa.XAResource, org.apache.derby.client.am.SqlException, .ClientStatement, .ClientMessageId, .LogWriter, org.apache.derby.client.ClientPooledConnection, .BasicClientDataSource, .ClientAutoloadedDriver, org.apache.derby.shared.common.reference.SQLState

Field Summary

Modifier and TypeField and Description
private NetConnection

Constructor Summary

AccessConstructor and Description
public
NetXAConnection(LogWriter
LogWriter object associated with this connection
logWriter
,
String
user id for this connection
user
,
String
password for this connection
password
,
BasicClientDataSource
The DataSource object passed from the ClientXAConnection object from which this constructor was called
dataSource
,
int
The Resource manager ID for XA Connections
rmId
,
boolean
true if this is a XA connection
isXAConn
,
ClientPooledConnection
The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object
cpc
)

The construcor for the NetXAConnection.

Method Summary

Modifier and TypeMethod and Description
private void
private NetConnection

Returns:

NetConnection
createNetConnection
(LogWriter
LogWriter object associated with this connection
logWriter
,
String
user id for this connection
user
,
String
password for this connection
password
,
BasicClientDataSource
The DataSource object passed from the ClientXAConnection object from which this constructor was called
dataSource
,
int
The Resource manager ID for XA Connections
rmId
,
boolean
true if this is a XA connection
isXAConn
,
ClientPooledConnection
The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object
cpc
)

Creates NetConnection for the supported version of jdbc.

public NetConnection

Returns:

NetConnection
getNetConnection
()

Returns underlying net connection

pack-priv void
private void
private void
pack-priv void
public void
setCorrelatorToken(byte[] crttoken)

pack-priv void
pack-priv void
private void
private void
pack-priv void
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

netConback to summary
private NetConnection netCon

Constructor Detail

NetXAConnectionback to summary
public NetXAConnection(LogWriter logWriter, String user, String password, BasicClientDataSource dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc) throws SqlException

The construcor for the NetXAConnection. The parameter is set to this from ClientXAConnection when it creates an instance of NetXAConnection. This is then passed on the underlying NetConnection constructor and is used to raise StatementEvents from any PreparedStatement that would be created from that NetConnection.

Parameters
logWriter:LogWriter

LogWriter object associated with this connection

user:String

user id for this connection

password:String

password for this connection

dataSource:BasicClientDataSource

The DataSource object passed from the ClientXAConnection object from which this constructor was called

rmId:int

The Resource manager ID for XA Connections

isXAConn:boolean

true if this is a XA connection

cpc:ClientPooledConnection

The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object

Exceptions
SqlException:
on error

Method Detail

checkPlatformVersionback to summary
private void checkPlatformVersion() throws SqlException
createNetConnectionback to summary
private NetConnection createNetConnection(LogWriter logWriter, String user, String password, BasicClientDataSource dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc) throws SqlException

Creates NetConnection for the supported version of jdbc. This method can be overwritten to return NetConnection of the supported jdbc version.

Parameters
logWriter:LogWriter

LogWriter object associated with this connection

user:String

user id for this connection

password:String

password for this connection

dataSource:BasicClientDataSource

The DataSource object passed from the ClientXAConnection object from which this constructor was called

rmId:int

The Resource manager ID for XA Connections

isXAConn:boolean

true if this is a XA connection

cpc:ClientPooledConnection

The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object

Returns:NetConnection

NetConnection

getNetConnectionback to summary
public NetConnection getNetConnection()

Returns underlying net connection

Returns:NetConnection

NetConnection

readCommitback to summary
pack-priv void readCommit() throws SqlException
readLocalXACommit_back to summary
private void readLocalXACommit_() throws SqlException
readLocalXARollback_back to summary
private void readLocalXARollback_() throws SqlException
readRollbackback to summary
pack-priv void readRollback() throws SqlException
setCorrelatorTokenback to summary
public void setCorrelatorToken(byte[] crttoken)
setNetXAResourceback to summary
pack-priv void setNetXAResource(NetXAResource xares)
writeCommitback to summary
pack-priv void writeCommit() throws SqlException
writeLocalXACommit_back to summary
private void writeLocalXACommit_() throws SqlException
writeLocalXARollback_back to summary
private void writeLocalXARollback_() throws SqlException
writeRollbackback to summary
pack-priv void writeRollback() throws SqlException
writeTransactionStartback to summary
pack-priv void writeTransactionStart(ClientStatement statement) throws SqlException