Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.client.net
Class NetXAConnection  view NetXAConnection download NetXAConnection.java

java.lang.Object
  extended byorg.apache.derby.client.am.Connection
      extended byorg.apache.derby.client.net.NetConnection
          extended byorg.apache.derby.client.net.NetXAConnection
All Implemented Interfaces:
java.sql.Connection, org.apache.derby.client.am.ConnectionCallbackInterface

public class NetXAConnection
extends NetConnection


Field Summary
 
Fields inherited from class org.apache.derby.client.net.NetConnection
cachedConnectBytes_, cnntkn_, crrtkn_, currXACallInfoOffset_, extnam_, indoubtTransactions_, netAgent_, pendingEndXACallinfoOffset_, prddta_, publicKey_, readOnlyTransaction_, securityMechanism_, targetAgent_, targetCmnappc_, targetCmntcpip_, targetExtnam_, targetPublicKey_, targetRdb_, targetRsyncmgr_, targetSecmec_, targetSecmgr_, targetSrvclsnm_, targetSrvnam_, targetSrvrlslv_, targetSyncptmgr_, targetXamgr_, wroteConnectFromCache_, xares_
 
Fields inherited from class org.apache.derby.client.am.Connection
agent_, autoCommit_, availableForReuse_, canUseCachedConnectBytes_, clientCursorNameCache_, commBufferSize_, databaseMetaData_, databaseName_, dataSource_, dncGeneratedSavepointId_, dncGeneratedSavepointNamePrefix__, encryptionManager_, inUnitOfWork_, isolation_, isXAConnection_, jdbcReadOnly_, loginTimeout_, open_, portNumber_, productID_, resetConnectionAtFirstSql_, resultSetHoldability_, retrieveMessageText_, serverNameIP_, user_, XA_T0_NOT_ASSOCIATED, XA_T1_ASSOCIATED, xaHostVersion_, xaState_
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Constructor Summary
NetXAConnection(NetLogWriter netLogWriter, java.lang.String user, java.lang.String password, org.apache.derby.jdbc.ClientDataSource dataSource, int rmId, boolean isXAConn)
           
 
Method Summary
private  void checkPlatformVersion()
           
 void close()
          This method immediately closes this database connection.
 void closeForReuse()
           
 void closeResources()
           
 void closeX()
           
protected  void finalize()
          Called on an object by the Virtual Machine at most once, at some point after the Object is determined unreachable but before it is destroyed.
 byte[] getCorrelatorToken()
           
 int getPort(javax.transaction.xa.Xid xid)
           
 byte[] getUOWID(javax.transaction.xa.Xid xid)
           
 void readCommit()
           
 void readLocalXACommit_()
           
 void readLocalXARollback_()
           
 void readLocalXAStart_()
           
 void readRollback()
           
 void setCorrelatorToken(byte[] crttoken)
           
 void setIndoubtTransactions(java.util.Hashtable indoubtTransactions)
           
(package private)  void setNetXAResource(NetXAResource xares)
           
 void writeCommit()
           
 void writeLocalXACommit_()
           
 void writeLocalXARollback_()
           
 void writeLocalXAStart_()
           
 void writeRollback()
           
 void writeTransactionStart(org.apache.derby.client.am.Statement statement)
           
 
Methods inherited from class org.apache.derby.client.net.NetConnection
addSpecialRegisters, allowCloseInUOW_, allowLocalCommitRollback_, checkAlternateServerHasEqualOrHigherProductLevel, checkResetPreconditions, completeConnect, completeReset, constructCrrtkn, doCloseStatementsOnClose_, doResetNow, flowConnect, flowReconnect, flowSimpleConnect, getAGENT, getCMNTCPIP, getCnnToken, getEncryptionManager, getInputStream, getOutputStream, getProductID, getRDB, getRSYNCMGR, getSECMGR, getSecurityMechanism, getSequenceNumber, getSocketAndInputOutputStreams, getSpecialRegisters, getSQLAM, getSYNCPTMGR, getTargetPublicKey, getXAMGR, isGlobalPending_, markClosed_, newAgent_, newCallableStatement_, newDatabaseMetaData_, newPositionedUpdatePreparedStatement_, newPreparedStatement_, newSectionManager, newStatement_, rdbAccessed, readCommitSubstitute_, readDeferredReset, readLocalCommit_, readLocalRollback_, readTransactionStart, reset_, reset_, resetCallableStatement_, resetNetConnection, resetPreparedStatement_, resetStatement_, securityCheckComplete, setAccessSecurityData, setInputStream, setOutputStream, setReadOnlyTransactionFlag, setServerAttributeData, willAutoCommitGenerateFlow, writeCommitSubstitute_, writeDeferredReset, writeLocalCommit_, writeLocalRollback_
 
Methods inherited from class org.apache.derby.client.am.Connection
accumulate440WarningForMessageProcFailure, accumulate444WarningForMessageProcFailure, accumulateWarning, checkForClosedConnection, clearWarnings, clearWarningsX, commit, completeAbnormalUnitOfWork, completeChainBreakingDisconnect, completeLocalCommit, completeLocalRollback, completeSqlca, createStatement, createStatement, createStatement, flowAutoCommit, flowCommit, flowRollback, getAutoCommit, getCatalog, getHoldability, getMetaData, getServerVersion, getTransactionIsolation, getTypeMap, getWarnings, getXAState, initConnection, isClosed, isClosedX, isPhysicalConnClosed, isReadOnly, isXAConnection, lightReset, markClosed, nativeSQL, nativeSQLX, prepareCall, prepareCall, prepareCall, prepareMessageProc, preparePositionedUpdateStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, reset, reset, resetConnection, resetConnection, resetPrepareCall, resetPrepareStatement, resetStatement, rollback, rollback, setAutoCommit, setCatalog, setHoldability, setInUnitOfWork, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap, setXAState
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetXAConnection

public NetXAConnection(NetLogWriter netLogWriter,
                       java.lang.String user,
                       java.lang.String password,
                       org.apache.derby.jdbc.ClientDataSource dataSource,
                       int rmId,
                       boolean isXAConn)
                throws org.apache.derby.client.am.SqlException
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Description copied from class: java.lang.Object
Called on an object by the Virtual Machine at most once, at some point after the Object is determined unreachable but before it is destroyed. You would think that this means it eventually is called on every Object, but this is not necessarily the case. If execution terminates abnormally, garbage collection does not always happen. Thus you cannot rely on this method to always work. For finer control over garbage collection, use references from the java.lang.ref package.

Virtual Machines are free to not call this method if they can determine that it does nothing important; for example, if your class extends Object and overrides finalize to do simply super.finalize().

finalize() will be called by a java.lang.Thread that has no locks on any Objects, and may be called concurrently. There are no guarantees on the order in which multiple objects are finalized. This means that finalize() is usually unsuited for performing actions that must be thread-safe, and that your implementation must be use defensive programming if it is to always work.

If an Exception is thrown from finalize() during garbage collection, it will be patently ignored and the Object will still be destroyed.

It is allowed, although not typical, for user code to call finalize() directly. User invocation does not affect whether automatic invocation will occur. It is also permitted, although not recommended, for a finalize() method to "revive" an object by making it reachable from normal code again.

Unlike constructors, finalize() does not get called for an object's superclass unless the implementation specifically calls super.finalize().

The default implementation does nothing.

Overrides:
finalize in class NetConnection

setCorrelatorToken

public void setCorrelatorToken(byte[] crttoken)

getCorrelatorToken

public byte[] getCorrelatorToken()

setNetXAResource

void setNetXAResource(NetXAResource xares)

writeLocalXAStart_

public void writeLocalXAStart_()
                        throws org.apache.derby.client.am.SqlException
Overrides:
writeLocalXAStart_ in class NetConnection

readLocalXAStart_

public void readLocalXAStart_()
                       throws org.apache.derby.client.am.SqlException
Overrides:
readLocalXAStart_ in class NetConnection

writeLocalXACommit_

public void writeLocalXACommit_()
                         throws org.apache.derby.client.am.SqlException
Overrides:
writeLocalXACommit_ in class NetConnection

readLocalXACommit_

public void readLocalXACommit_()
                        throws org.apache.derby.client.am.SqlException
Overrides:
readLocalXACommit_ in class NetConnection

writeLocalXARollback_

public void writeLocalXARollback_()
                           throws org.apache.derby.client.am.SqlException
Overrides:
writeLocalXARollback_ in class NetConnection

readLocalXARollback_

public void readLocalXARollback_()
                          throws org.apache.derby.client.am.SqlException
Overrides:
readLocalXARollback_ in class NetConnection

writeTransactionStart

public void writeTransactionStart(org.apache.derby.client.am.Statement statement)
                           throws org.apache.derby.client.am.SqlException
Overrides:
writeTransactionStart in class NetConnection

setIndoubtTransactions

public void setIndoubtTransactions(java.util.Hashtable indoubtTransactions)
Overrides:
setIndoubtTransactions in class NetConnection

getUOWID

public byte[] getUOWID(javax.transaction.xa.Xid xid)

getPort

public int getPort(javax.transaction.xa.Xid xid)

writeCommit

public void writeCommit()
                 throws org.apache.derby.client.am.SqlException

readCommit

public void readCommit()
                throws org.apache.derby.client.am.SqlException

writeRollback

public void writeRollback()
                   throws org.apache.derby.client.am.SqlException

readRollback

public void readRollback()
                  throws org.apache.derby.client.am.SqlException

close

public void close()
           throws org.apache.derby.client.am.SqlException
Description copied from interface: java.sql.Connection
This method immediately closes this database connection.


closeX

public void closeX()
            throws org.apache.derby.client.am.SqlException

closeForReuse

public void closeForReuse()
                   throws org.apache.derby.client.am.SqlException

closeResources

public void closeResources()
                    throws org.apache.derby.client.am.SqlException

checkPlatformVersion

private void checkPlatformVersion()
                           throws org.apache.derby.client.am.SqlException