org.apache.derby.client.net
Class NetConnection

java.lang.Object
  extended by org.apache.derby.client.am.Connection
      extended by org.apache.derby.client.net.NetConnection
All Implemented Interfaces:
java.sql.Connection, java.sql.Wrapper, ConnectionCallbackInterface
Direct Known Subclasses:
NetConnection40

public class NetConnection
extends Connection


Field Summary
private  boolean closeStatementsOnClose
           
protected  byte[] cnntkn_
           
private  boolean connectionNull
           
 byte[] crrtkn_
           
protected  int currXACallInfoOffset_
           
private  char[] deferredResetPassword_
           
(package private)  java.lang.String extnam_
           
protected  java.util.Hashtable indoubtTransactions_
           
protected static MessageUtil msgutil
           
protected  NetAgent netAgent_
           
protected  int pendingEndXACallinfoOffset_
           
private  ClientPooledConnection pooledConnection_
           
(package private)  byte[] prddta_
           
(package private)  byte[] publicKey_
           
protected  boolean readOnlyTransaction_
           
private  int rmId_
           
protected  int securityMechanism_
           
private  short seqNo_
           
(package private)  byte[] sourceSeed_
           
protected  int targetAgent_
           
protected  int targetCmnappc_
           
protected  int targetCmntcpip_
           
(package private)  java.lang.String targetExtnam_
           
(package private)  byte[] targetPublicKey_
           
protected  int targetRdb_
           
protected  int targetRsyncmgr_
           
(package private)  int targetSecmec_
           
 int targetSecmgr_
           
(package private)  byte[] targetSeed_
           
 java.lang.String targetSrvclsnm_
           
protected  java.lang.String targetSrvnam_
           
 java.lang.String targetSrvrlslv_
           
protected  int targetSyncptmgr_
           
protected  int targetXamgr_
           
protected  NetXAResource xares_
           
 
Fields inherited from class org.apache.derby.client.am.Connection
agent_, autoCommit_, clientSSLMode_, commBufferSize_, databaseMetaData_, databaseName_, dataSource_, dncGeneratedSavepointId_, dncGeneratedSavepointNamePrefix__, encryptionManager_, inUnitOfWork_, isXAConnection_, jdbcReadOnly_, loginTimeout_, open_, portNumber_, productID_, resetConnectionAtFirstSql_, retrieveMessageText_, serverNameIP_, user_, XA_T0_NOT_ASSOCIATED, XA_T1_ASSOCIATED, xaHostVersion_
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Constructor Summary
NetConnection(NetLogWriter netLogWriter, ClientBaseDataSource dataSource, java.lang.String user, java.lang.String password)
           
NetConnection(NetLogWriter netLogWriter, int driverManagerLoginTimeout, java.lang.String serverName, int portNumber, java.lang.String databaseName, java.util.Properties properties)
           
NetConnection(NetLogWriter netLogWriter, java.lang.String ipaddr, int portNumber, ClientBaseDataSource dataSource, boolean isXAConn)
           
NetConnection(NetLogWriter netLogWriter, java.lang.String databaseName, java.util.Properties properties)
           
NetConnection(NetLogWriter netLogWriter, java.lang.String user, java.lang.String password, ClientBaseDataSource dataSource, int rmId, boolean isXAConn)
           
NetConnection(NetLogWriter netLogWriter, java.lang.String user, java.lang.String password, ClientBaseDataSource dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc)
          This constructor is called from the ClientPooledConnection object to enable the NetConnection to pass this on to the associated prepared statement object thus enabling the prepared statement object to inturn raise the statement events to the ClientPooledConnection object
 
Method Summary
 void addSpecialRegisters(java.lang.String s)
           
protected  boolean allowCloseInUOW_()
          Check if the connection can be closed when there are uncommitted operations.
protected  boolean allowLocalCommitRollback_()
           
protected  int checkAlternateServerHasEqualOrHigherProductLevel(ProductLevel orgLvl, int orgServerType)
           
private  void checkDatabaseName()
           
private  void checkPasswordLength(java.lang.String password)
           
private  void checkSecmgrForSecmecSupport(int securityMechanism)
           
private  void checkUser(java.lang.String user)
           
private  void checkUserLength(java.lang.String user)
           
private  void checkUserPassword(java.lang.String user, java.lang.String password)
           
 void close()
          closes underlying connection and associated resource.
 void closeForReuse()
          Invalidates connection but keeps socket open.
 void closeResources()
          closes resources connection will be not available for reuse.
 void closeX()
          closes underlying connection and associated resource.
 void completeConnect()
           
protected  void completeReset(boolean isDeferredReset)
           
protected  void constructCrrtkn()
           
private  void constructExtnam()
           
private  void constructPrddta()
           
protected  boolean doCloseStatementsOnClose_()
           
 void doResetNow()
           
private  byte[] encryptedPasswordForEUSRIDPWD(java.lang.String password)
           
private  byte[] encryptedPasswordForUSRENCPWD(java.lang.String password)
           
private  byte[] encryptedUseridForEUSRIDPWD()
           
protected  void finalize()
           
private  char[] flipBits(char[] array)
           
 void flowConnect(java.lang.String password, int securityMechanism)
           
private  void flowEUSRIDDTAconnect()
           
private  void flowEUSRIDPWDconnect(java.lang.String password)
           
private  void flowEUSRPWDDTAconnect(java.lang.String password)
           
private  void flowKeyExchange(int securityMechanism, byte[] publicKey)
           
protected  boolean flowReconnect(java.lang.String password, int securityMechanism)
           
private  void flowSecurityCheckAndAccessRdb(int securityMechanism, java.lang.String user, java.lang.String password, byte[] encryptedUserid, byte[] encryptedPassword)
           
private  void flowSeedExchange(int securityMechanism, byte[] sourceSeed)
           
private  void flowServerAttributes()
           
private  void flowServerAttributesAndKeyExchange(int securityMechanism, byte[] publicKey)
           
private  void flowServerAttributesAndSeedExchange(int securityMechanism, byte[] sourceSeed)
           
protected  void flowSimpleConnect()
           
private  void flowUSRENCPWDconnect(java.lang.String password)
           
private  void flowUSRIDONLconnect()
           
private  void flowUSRIDPWDconnect(java.lang.String password)
           
private  void flowUSRSSBPWDconnect(java.lang.String password)
          The User ID and Strong Password Substitute mechanism (USRSSBPWD) authenticates the user like the user ID and password mechanism, but the password does not flow.
 int getAGENT()
           
 int getCMNTCPIP()
           
protected  byte[] getCnnToken()
           
private  java.lang.String getDeferredResetPassword()
           
 EncryptionManager getEncryptionManager()
           
 java.io.InputStream getInputStream()
           
 java.io.OutputStream getOutputStream()
           
 java.lang.String getProductID()
           
 int getRDB()
           
 int getRSYNCMGR()
           
 int getSECMGR()
           
 int getSecurityMechanism()
           
protected  short getSequenceNumber()
           
protected  int getSocketAndInputOutputStreams(java.lang.String server, int port, int clientSSLMode)
           
(package private)  java.util.List getSpecialRegisters()
           
 int getSQLAM()
           
 int getSYNCPTMGR()
           
 byte[] getTargetPublicKey()
           
 int getXAMGR()
           
private  void initialize(java.lang.String password, ClientBaseDataSource dataSource, int rmId, boolean isXAConn)
           
private  void initializeClientSeed()
           
private  void initializePublicKeyForEncryption()
           
 boolean isConnectionNull()
           
protected  boolean isGlobalPending_()
           
 boolean isOpen()
          Returns if a transaction is in process
private  SqlException mapSecchkcd(int secchkcd)
           
protected  void markClosed_()
           
protected  Agent newAgent_(LogWriter logWriter, int loginTimeout, java.lang.String serverName, int portNumber, int clientSSLMode)
           
protected  CallableStatement newCallableStatement_(java.lang.String sql, int type, int concurrency, int holdability)
           
protected  DatabaseMetaData newDatabaseMetaData_()
           
protected  PreparedStatement newPositionedUpdatePreparedStatement_(java.lang.String sql, Section section)
           
protected  PreparedStatement newPreparedStatement_(java.lang.String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, java.lang.String[] columnNames, int[] columnIndexes)
           
 SectionManager newSectionManager(java.lang.String collection, Agent agent, java.lang.String databaseName)
           
protected  Statement newStatement_(int type, int concurrency, int holdability)
           
private  byte[] passwordSubstituteForUSRSSBPWD(java.lang.String password)
           
(package private)  void rdbAccessed(int svrcod, java.lang.String prdid, boolean crrtknReceived, byte[] crrtkn)
           
private  void readAllConnectCommandsChained(int securityMechanism)
           
 void readCommitSubstitute_()
           
(package private)  void readDeferredReset()
           
 void readLocalCommit_()
           
 void readLocalRollback_()
           
 void readLocalXACommit_()
           
 void readLocalXARollback_()
           
 void readLocalXAStart_()
           
private  void readSecurityCheckAndAccessRdb()
           
private  void readServerAttributesAndKeyExchange(int securityMechanism)
           
private  void readServerAttributesAndSeedExchange()
           
 void readTransactionStart()
           
protected  void readXACommit_()
          Invokes readCommit on NetXAConnection
protected  void readXARollback_()
          Invokes writeRollback on NetXAConnection
protected  void reset_(LogWriter logWriter)
           
protected  void resetCallableStatement_(CallableStatement cs, java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
           
 void resetNetConnection(LogWriter logWriter)
           
protected  void resetPreparedStatement_(PreparedStatement ps, java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, int autoGeneratedKeys, java.lang.String[] columnNames, int[] columnIndexes)
           
protected  void resetStatement_(Statement statement, int type, int concurrency, int holdability)
           
(package private)  void securityCheckComplete(int svrcod, int secchkcd)
           
protected  boolean serverSupportsEXTDTAAbort()
           
 boolean serverSupportsLayerBStreaming()
           
protected  boolean serverSupportsLocators()
          Checks whether the server supports locators for large objects.
 boolean serverSupportsQryclsimp()
          Check whether the server has full support for the QRYCLSIMP parameter in OPNQRY.
protected  boolean serverSupportsTimestampNanoseconds()
          Return true if the server supports nanoseconds in timestamps
protected  boolean serverSupportsUDTs()
          Check whether the server supports UDTs
(package private)  void setAccessSecurityData(int secchkcd, int desiredSecmec, int[] secmecList, boolean sectknReceived, byte[] sectkn)
           
 void setConnectionNull(boolean connectionNull)
           
private  void setDeferredResetPassword(java.lang.String password)
           
 void setIndoubtTransactions(java.util.Hashtable indoubtTransactions)
           
 void setInputStream(java.io.InputStream inputStream)
           
 void setOutputStream(java.io.OutputStream outputStream)
           
protected  void setReadOnlyTransactionFlag(boolean flag)
           
(package private)  void setServerAttributeData(java.lang.String extnam, java.lang.String srvclsnm, java.lang.String srvnam, java.lang.String srvrlslv)
           
protected  boolean supportsSessionDataCaching()
          Check whether the server supports session data caching
 boolean willAutoCommitGenerateFlow()
           
private  void writeAllConnectCommandsChained(int securityMechanism, java.lang.String user, java.lang.String password)
           
 void writeCommitSubstitute_()
           
(package private)  void writeDeferredReset()
           
 void writeLocalCommit_()
           
 void writeLocalRollback_()
           
 void writeLocalXACommit_()
           
 void writeLocalXARollback_()
           
 void writeLocalXAStart_()
           
private  void writeSecurityCheckAndAccessRdb(int securityMechanism, java.lang.String user, java.lang.String password, byte[] encryptedUserid, byte[] encryptedPassword)
           
private  void writeServerAttributesAndKeyExchange(int securityMechanism, byte[] publicKey)
           
private  void writeServerAttributesAndSeedExchange(byte[] sourceSeed)
           
 void writeTransactionStart(Statement statement)
           
protected  void writeXACommit_()
          Invokes write commit on NetXAConnection
protected  void writeXARollback_()
          Invokes writeRollback on NetXAConnection
protected  void writeXATransactionStart(Statement statement)
           
 
Methods inherited from class org.apache.derby.client.am.Connection
accumulate440WarningForMessageProcFailure, accumulate444WarningForMessageProcFailure, accumulateWarning, checkForClosedConnection, clearWarnings, clearWarningsX, closeForReuse, commit, completeAbnormalUnitOfWork, completeAbnormalUnitOfWork, completeChainBreakingDisconnect, completeLocalCommit, completeLocalRollback, completePiggyBackIsolation, completePiggyBackSchema, completeReset, completeSpecificRollback, completeSqlca, createBlob, createClob, createStatement, createStatement, createStatement, flowAutoCommit, flowCommit, flowRollback, getAutoCommit, getCatalog, getCurrentSchemaName, getHoldability, getMetaData, getServerVersion, getTransactionID, 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, readCommit, readRollback, releaseSavepoint, reset, resetConnection, resetPrepareCall, resetPrepareStatement, resetStatement, rollback, rollback, setAutoCommit, setCatalog, setHoldability, setInUnitOfWork, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap, setXAState, transactionInProgress, writeCommit, writeRollback
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.Connection
createArrayOf, createNClob, createSQLXML, createStruct, getClientInfo, getClientInfo, isValid, setClientInfo, setClientInfo
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Field Detail

msgutil

protected static MessageUtil msgutil

netAgent_

protected NetAgent netAgent_

pooledConnection_

private final ClientPooledConnection pooledConnection_

closeStatementsOnClose

private final boolean closeStatementsOnClose

pendingEndXACallinfoOffset_

protected int pendingEndXACallinfoOffset_

targetAgent_

protected int targetAgent_

targetCmntcpip_

protected int targetCmntcpip_

targetRdb_

protected int targetRdb_

targetSecmgr_

public int targetSecmgr_

targetCmnappc_

protected int targetCmnappc_

targetXamgr_

protected int targetXamgr_

targetSyncptmgr_

protected int targetSyncptmgr_

targetRsyncmgr_

protected int targetRsyncmgr_

targetExtnam_

java.lang.String targetExtnam_

extnam_

java.lang.String extnam_

targetSrvclsnm_

public java.lang.String targetSrvclsnm_

targetSrvnam_

protected java.lang.String targetSrvnam_

targetSrvrlslv_

public java.lang.String targetSrvrlslv_

publicKey_

transient byte[] publicKey_

targetPublicKey_

transient byte[] targetPublicKey_

sourceSeed_

transient byte[] sourceSeed_

targetSeed_

transient byte[] targetSeed_

prddta_

byte[] prddta_

crrtkn_

public byte[] crrtkn_

targetSecmec_

int targetSecmec_

securityMechanism_

protected int securityMechanism_

deferredResetPassword_

private transient char[] deferredResetPassword_

connectionNull

private boolean connectionNull

cnntkn_

protected byte[] cnntkn_

rmId_

private int rmId_

xares_

protected NetXAResource xares_

indoubtTransactions_

protected java.util.Hashtable indoubtTransactions_

currXACallInfoOffset_

protected int currXACallInfoOffset_

seqNo_

private short seqNo_

readOnlyTransaction_

protected boolean readOnlyTransaction_
Constructor Detail

NetConnection

public NetConnection(NetLogWriter netLogWriter,
                     java.lang.String databaseName,
                     java.util.Properties properties)
              throws SqlException
Throws:
SqlException

NetConnection

public NetConnection(NetLogWriter netLogWriter,
                     ClientBaseDataSource dataSource,
                     java.lang.String user,
                     java.lang.String password)
              throws SqlException
Throws:
SqlException

NetConnection

public NetConnection(NetLogWriter netLogWriter,
                     int driverManagerLoginTimeout,
                     java.lang.String serverName,
                     int portNumber,
                     java.lang.String databaseName,
                     java.util.Properties properties)
              throws SqlException
Throws:
SqlException

NetConnection

public NetConnection(NetLogWriter netLogWriter,
                     java.lang.String user,
                     java.lang.String password,
                     ClientBaseDataSource dataSource,
                     int rmId,
                     boolean isXAConn)
              throws SqlException
Throws:
SqlException

NetConnection

public NetConnection(NetLogWriter netLogWriter,
                     java.lang.String ipaddr,
                     int portNumber,
                     ClientBaseDataSource dataSource,
                     boolean isXAConn)
              throws SqlException
Throws:
SqlException

NetConnection

public NetConnection(NetLogWriter netLogWriter,
                     java.lang.String user,
                     java.lang.String password,
                     ClientBaseDataSource dataSource,
                     int rmId,
                     boolean isXAConn,
                     ClientPooledConnection cpc)
              throws SqlException
This constructor is called from the ClientPooledConnection object to enable the NetConnection to pass this on to the associated prepared statement object thus enabling the prepared statement object to inturn raise the statement events to the ClientPooledConnection object

Parameters:
netLogWriter - NetLogWriter object associated with this connection
user - user id for this connection
password - password for this connection
dataSource - The DataSource object passed from the PooledConnection object from which this constructor was called
rmId - The Resource manager ID for XA Connections
isXAConn - true if this is a XA connection
cpc - The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object
Throws:
SqlException
Method Detail

setDeferredResetPassword

private void setDeferredResetPassword(java.lang.String password)

getDeferredResetPassword

private java.lang.String getDeferredResetPassword()

initialize

private void initialize(java.lang.String password,
                        ClientBaseDataSource dataSource,
                        int rmId,
                        boolean isXAConn)
                 throws SqlException
Throws:
SqlException

resetNetConnection

public void resetNetConnection(LogWriter logWriter)
                        throws SqlException
Throws:
SqlException

reset_

protected void reset_(LogWriter logWriter)
               throws SqlException
Specified by:
reset_ in class Connection
Throws:
SqlException

getSpecialRegisters

java.util.List getSpecialRegisters()

addSpecialRegisters

public void addSpecialRegisters(java.lang.String s)
Specified by:
addSpecialRegisters in class Connection

completeConnect

public void completeConnect()
                     throws SqlException
Overrides:
completeConnect in class Connection
Throws:
SqlException

completeReset

protected void completeReset(boolean isDeferredReset)
                      throws SqlException
Throws:
SqlException

flowConnect

public void flowConnect(java.lang.String password,
                        int securityMechanism)
                 throws SqlException
Throws:
SqlException

flowSimpleConnect

protected void flowSimpleConnect()
                          throws SqlException
Throws:
SqlException

flowReconnect

protected boolean flowReconnect(java.lang.String password,
                                int securityMechanism)
                         throws SqlException
Throws:
SqlException

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class Connection
Throws:
java.lang.Throwable

getCnnToken

protected byte[] getCnnToken()

getSequenceNumber

protected short getSequenceNumber()

flowUSRIDPWDconnect

private void flowUSRIDPWDconnect(java.lang.String password)
                          throws SqlException
Throws:
SqlException

flowUSRIDONLconnect

private void flowUSRIDONLconnect()
                          throws SqlException
Throws:
SqlException

flowUSRENCPWDconnect

private void flowUSRENCPWDconnect(java.lang.String password)
                           throws SqlException
Throws:
SqlException

flowEUSRIDPWDconnect

private void flowEUSRIDPWDconnect(java.lang.String password)
                           throws SqlException
Throws:
SqlException

flowEUSRIDDTAconnect

private void flowEUSRIDDTAconnect()
                           throws SqlException
Throws:
SqlException

flowEUSRPWDDTAconnect

private void flowEUSRPWDDTAconnect(java.lang.String password)
                            throws SqlException
Throws:
SqlException

flowUSRSSBPWDconnect

private void flowUSRSSBPWDconnect(java.lang.String password)
                           throws SqlException
The User ID and Strong Password Substitute mechanism (USRSSBPWD) authenticates the user like the user ID and password mechanism, but the password does not flow. A password substitute is generated instead using the SHA-1 algorithm, and is sent to the application server. The application server generates a password substitute using the same algorithm and compares it with the application requester's password substitute. If equal, the user is authenticated. The SECTKN parameter is used to flow the client and server encryption seeds on the ACCSEC and ACCSECRD commands. More information in DRDA, V3, Volume 3 standard - PWDSSB (page 650)

Throws:
SqlException

flowServerAttributes

private void flowServerAttributes()
                           throws SqlException
Throws:
SqlException

flowKeyExchange

private void flowKeyExchange(int securityMechanism,
                             byte[] publicKey)
                      throws SqlException
Throws:
SqlException

flowSeedExchange

private void flowSeedExchange(int securityMechanism,
                              byte[] sourceSeed)
                       throws SqlException
Throws:
SqlException

flowServerAttributesAndKeyExchange

private void flowServerAttributesAndKeyExchange(int securityMechanism,
                                                byte[] publicKey)
                                         throws SqlException
Throws:
SqlException

flowServerAttributesAndSeedExchange

private void flowServerAttributesAndSeedExchange(int securityMechanism,
                                                 byte[] sourceSeed)
                                          throws SqlException
Throws:
SqlException

flowSecurityCheckAndAccessRdb

private void flowSecurityCheckAndAccessRdb(int securityMechanism,
                                           java.lang.String user,
                                           java.lang.String password,
                                           byte[] encryptedUserid,
                                           byte[] encryptedPassword)
                                    throws SqlException
Throws:
SqlException

writeAllConnectCommandsChained

private void writeAllConnectCommandsChained(int securityMechanism,
                                            java.lang.String user,
                                            java.lang.String password)
                                     throws SqlException
Throws:
SqlException

readAllConnectCommandsChained

private void readAllConnectCommandsChained(int securityMechanism)
                                    throws SqlException
Throws:
SqlException

writeServerAttributesAndKeyExchange

private void writeServerAttributesAndKeyExchange(int securityMechanism,
                                                 byte[] publicKey)
                                          throws SqlException
Throws:
SqlException

writeServerAttributesAndSeedExchange

private void writeServerAttributesAndSeedExchange(byte[] sourceSeed)
                                           throws SqlException
Throws:
SqlException

readServerAttributesAndKeyExchange

private void readServerAttributesAndKeyExchange(int securityMechanism)
                                         throws SqlException
Throws:
SqlException

readServerAttributesAndSeedExchange

private void readServerAttributesAndSeedExchange()
                                          throws SqlException
Throws:
SqlException

writeSecurityCheckAndAccessRdb

private void writeSecurityCheckAndAccessRdb(int securityMechanism,
                                            java.lang.String user,
                                            java.lang.String password,
                                            byte[] encryptedUserid,
                                            byte[] encryptedPassword)
                                     throws SqlException
Throws:
SqlException

readSecurityCheckAndAccessRdb

private void readSecurityCheckAndAccessRdb()
                                    throws SqlException
Throws:
SqlException

writeDeferredReset

void writeDeferredReset()
                  throws SqlException
Throws:
SqlException

readDeferredReset

void readDeferredReset()
                 throws SqlException
Throws:
SqlException

setServerAttributeData

void setServerAttributeData(java.lang.String extnam,
                            java.lang.String srvclsnm,
                            java.lang.String srvnam,
                            java.lang.String srvrlslv)

setAccessSecurityData

void setAccessSecurityData(int secchkcd,
                           int desiredSecmec,
                           int[] secmecList,
                           boolean sectknReceived,
                           byte[] sectkn)
                     throws DisconnectException
Throws:
DisconnectException

securityCheckComplete

void securityCheckComplete(int svrcod,
                           int secchkcd)

rdbAccessed

void rdbAccessed(int svrcod,
                 java.lang.String prdid,
                 boolean crrtknReceived,
                 byte[] crrtkn)

newAgent_

protected Agent newAgent_(LogWriter logWriter,
                          int loginTimeout,
                          java.lang.String serverName,
                          int portNumber,
                          int clientSSLMode)
                   throws SqlException
Specified by:
newAgent_ in class Connection
Throws:
SqlException

newStatement_

protected Statement newStatement_(int type,
                                  int concurrency,
                                  int holdability)
                           throws SqlException
Specified by:
newStatement_ in class Connection
Throws:
SqlException

resetStatement_

protected void resetStatement_(Statement statement,
                               int type,
                               int concurrency,
                               int holdability)
                        throws SqlException
Specified by:
resetStatement_ in class Connection
Throws:
SqlException

newPositionedUpdatePreparedStatement_

protected PreparedStatement newPositionedUpdatePreparedStatement_(java.lang.String sql,
                                                                  Section section)
                                                           throws SqlException
Specified by:
newPositionedUpdatePreparedStatement_ in class Connection
Throws:
SqlException

newPreparedStatement_

protected PreparedStatement newPreparedStatement_(java.lang.String sql,
                                                  int type,
                                                  int concurrency,
                                                  int holdability,
                                                  int autoGeneratedKeys,
                                                  java.lang.String[] columnNames,
                                                  int[] columnIndexes)
                                           throws SqlException
Specified by:
newPreparedStatement_ in class Connection
Throws:
SqlException

resetPreparedStatement_

protected void resetPreparedStatement_(PreparedStatement ps,
                                       java.lang.String sql,
                                       int resultSetType,
                                       int resultSetConcurrency,
                                       int resultSetHoldability,
                                       int autoGeneratedKeys,
                                       java.lang.String[] columnNames,
                                       int[] columnIndexes)
                                throws SqlException
Specified by:
resetPreparedStatement_ in class Connection
Throws:
SqlException

newCallableStatement_

protected CallableStatement newCallableStatement_(java.lang.String sql,
                                                  int type,
                                                  int concurrency,
                                                  int holdability)
                                           throws SqlException
Specified by:
newCallableStatement_ in class Connection
Throws:
SqlException

resetCallableStatement_

protected void resetCallableStatement_(CallableStatement cs,
                                       java.lang.String sql,
                                       int resultSetType,
                                       int resultSetConcurrency,
                                       int resultSetHoldability)
                                throws SqlException
Specified by:
resetCallableStatement_ in class Connection
Throws:
SqlException

newDatabaseMetaData_

protected DatabaseMetaData newDatabaseMetaData_()
Specified by:
newDatabaseMetaData_ in class Connection

checkDatabaseName

private void checkDatabaseName()
                        throws SqlException
Throws:
SqlException

checkUserLength

private void checkUserLength(java.lang.String user)
                      throws SqlException
Throws:
SqlException

checkPasswordLength

private void checkPasswordLength(java.lang.String password)
                          throws SqlException
Throws:
SqlException

checkUser

private void checkUser(java.lang.String user)
                throws SqlException
Throws:
SqlException

checkUserPassword

private void checkUserPassword(java.lang.String user,
                               java.lang.String password)
                        throws SqlException
Throws:
SqlException

checkSecmgrForSecmecSupport

private void checkSecmgrForSecmecSupport(int securityMechanism)
                                  throws SqlException
Throws:
SqlException

mapSecchkcd

private SqlException mapSecchkcd(int secchkcd)

constructCrrtkn

protected void constructCrrtkn()
                        throws SqlException
Throws:
SqlException

constructExtnam

private void constructExtnam()
                      throws SqlException
Throws:
SqlException

constructPrddta

private void constructPrddta()
                      throws SqlException
Throws:
SqlException

initializePublicKeyForEncryption

private void initializePublicKeyForEncryption()
                                       throws SqlException
Throws:
SqlException

initializeClientSeed

private void initializeClientSeed()
                           throws SqlException
Throws:
SqlException

encryptedPasswordForUSRENCPWD

private byte[] encryptedPasswordForUSRENCPWD(java.lang.String password)
                                      throws SqlException
Throws:
SqlException

encryptedUseridForEUSRIDPWD

private byte[] encryptedUseridForEUSRIDPWD()
                                    throws SqlException
Throws:
SqlException

encryptedPasswordForEUSRIDPWD

private byte[] encryptedPasswordForEUSRIDPWD(java.lang.String password)
                                      throws SqlException
Throws:
SqlException

passwordSubstituteForUSRSSBPWD

private byte[] passwordSubstituteForUSRSSBPWD(java.lang.String password)
                                       throws SqlException
Throws:
SqlException

getSQLAM

public int getSQLAM()

getAGENT

public int getAGENT()

getCMNTCPIP

public int getCMNTCPIP()

getRDB

public int getRDB()

getSECMGR

public int getSECMGR()

getXAMGR

public int getXAMGR()

getSYNCPTMGR

public int getSYNCPTMGR()

getRSYNCMGR

public int getRSYNCMGR()

flipBits

private char[] flipBits(char[] array)

writeCommitSubstitute_

public void writeCommitSubstitute_()
                            throws SqlException
Specified by:
writeCommitSubstitute_ in class Connection
Throws:
SqlException

readCommitSubstitute_

public void readCommitSubstitute_()
                           throws SqlException
Specified by:
readCommitSubstitute_ in class Connection
Throws:
SqlException

writeLocalXAStart_

public void writeLocalXAStart_()
                        throws SqlException
Specified by:
writeLocalXAStart_ in class Connection
Throws:
SqlException

readLocalXAStart_

public void readLocalXAStart_()
                       throws SqlException
Specified by:
readLocalXAStart_ in class Connection
Throws:
SqlException

writeLocalXACommit_

public void writeLocalXACommit_()
                         throws SqlException
Specified by:
writeLocalXACommit_ in class Connection
Throws:
SqlException

readLocalXACommit_

public void readLocalXACommit_()
                        throws SqlException
Specified by:
readLocalXACommit_ in class Connection
Throws:
SqlException

writeLocalXARollback_

public void writeLocalXARollback_()
                           throws SqlException
Specified by:
writeLocalXARollback_ in class Connection
Throws:
SqlException

readLocalXARollback_

public void readLocalXARollback_()
                          throws SqlException
Specified by:
readLocalXARollback_ in class Connection
Throws:
SqlException

writeLocalCommit_

public void writeLocalCommit_()
                       throws SqlException
Specified by:
writeLocalCommit_ in class Connection
Throws:
SqlException

readLocalCommit_

public void readLocalCommit_()
                      throws SqlException
Specified by:
readLocalCommit_ in class Connection
Throws:
SqlException

writeLocalRollback_

public void writeLocalRollback_()
                         throws SqlException
Specified by:
writeLocalRollback_ in class Connection
Throws:
SqlException

readLocalRollback_

public void readLocalRollback_()
                        throws SqlException
Specified by:
readLocalRollback_ in class Connection
Throws:
SqlException

markClosed_

protected void markClosed_()
Specified by:
markClosed_ in class Connection

isGlobalPending_

protected boolean isGlobalPending_()
Specified by:
isGlobalPending_ in class Connection

doCloseStatementsOnClose_

protected boolean doCloseStatementsOnClose_()
Specified by:
doCloseStatementsOnClose_ in class Connection

allowCloseInUOW_

protected boolean allowCloseInUOW_()
Check if the connection can be closed when there are uncommitted operations.

Specified by:
allowCloseInUOW_ in class Connection
Returns:
if this connection can be closed when it has uncommitted operations, true; otherwise, false

allowLocalCommitRollback_

protected boolean allowLocalCommitRollback_()
Specified by:
allowLocalCommitRollback_ in class Connection

setInputStream

public void setInputStream(java.io.InputStream inputStream)

setOutputStream

public void setOutputStream(java.io.OutputStream outputStream)

getInputStream

public java.io.InputStream getInputStream()

getOutputStream

public java.io.OutputStream getOutputStream()

writeTransactionStart

public void writeTransactionStart(Statement statement)
                           throws SqlException
Overrides:
writeTransactionStart in class Connection
Throws:
SqlException

readTransactionStart

public void readTransactionStart()
                          throws SqlException
Overrides:
readTransactionStart in class Connection
Throws:
SqlException

setIndoubtTransactions

public void setIndoubtTransactions(java.util.Hashtable indoubtTransactions)

setReadOnlyTransactionFlag

protected void setReadOnlyTransactionFlag(boolean flag)

newSectionManager

public SectionManager newSectionManager(java.lang.String collection,
                                        Agent agent,
                                        java.lang.String databaseName)
Specified by:
newSectionManager in class Connection

getSocketAndInputOutputStreams

protected int getSocketAndInputOutputStreams(java.lang.String server,
                                             int port,
                                             int clientSSLMode)

checkAlternateServerHasEqualOrHigherProductLevel

protected int checkAlternateServerHasEqualOrHigherProductLevel(ProductLevel orgLvl,
                                                               int orgServerType)

willAutoCommitGenerateFlow

public boolean willAutoCommitGenerateFlow()
Overrides:
willAutoCommitGenerateFlow in class Connection

getSecurityMechanism

public int getSecurityMechanism()

getEncryptionManager

public EncryptionManager getEncryptionManager()

getTargetPublicKey

public byte[] getTargetPublicKey()

getProductID

public java.lang.String getProductID()

doResetNow

public void doResetNow()
                throws SqlException
Throws:
SqlException

isConnectionNull

public boolean isConnectionNull()
Returns:
Returns the connectionNull.

setConnectionNull

public void setConnectionNull(boolean connectionNull)
Parameters:
connectionNull - The connectionNull to set.

serverSupportsQryclsimp

public final boolean serverSupportsQryclsimp()
Check whether the server has full support for the QRYCLSIMP parameter in OPNQRY.

Returns:
true if QRYCLSIMP is fully supported

serverSupportsLayerBStreaming

public final boolean serverSupportsLayerBStreaming()

supportsSessionDataCaching

protected final boolean supportsSessionDataCaching()
Check whether the server supports session data caching

Specified by:
supportsSessionDataCaching in class Connection
Returns:
true session data caching is supported

serverSupportsUDTs

protected final boolean serverSupportsUDTs()
Check whether the server supports UDTs

Returns:
true if UDTs are supported

serverSupportsEXTDTAAbort

protected final boolean serverSupportsEXTDTAAbort()

serverSupportsLocators

protected final boolean serverSupportsLocators()
Checks whether the server supports locators for large objects.

Specified by:
serverSupportsLocators in class Connection
Returns:
true if LOB locators are supported.

serverSupportsTimestampNanoseconds

protected final boolean serverSupportsTimestampNanoseconds()
Return true if the server supports nanoseconds in timestamps

Specified by:
serverSupportsTimestampNanoseconds in class Connection

isOpen

public boolean isOpen()
Returns if a transaction is in process

Returns:
open

close

public void close()
           throws java.sql.SQLException
closes underlying connection and associated resource.

Specified by:
close in interface java.sql.Connection
Overrides:
close in class Connection
Throws:
java.sql.SQLException

closeX

public void closeX()
            throws java.sql.SQLException
closes underlying connection and associated resource.

Overrides:
closeX in class Connection
Throws:
java.sql.SQLException

closeForReuse

public void closeForReuse()
                   throws SqlException
Invalidates connection but keeps socket open.

Throws:
SqlException

closeResources

public void closeResources()
                    throws java.sql.SQLException
closes resources connection will be not available for reuse.

Overrides:
closeResources in class Connection
Throws:
java.sql.SQLException

writeXACommit_

protected void writeXACommit_()
                       throws SqlException
Invokes write commit on NetXAConnection

Specified by:
writeXACommit_ in class Connection
Throws:
SqlException

readXACommit_

protected void readXACommit_()
                      throws SqlException
Invokes readCommit on NetXAConnection

Specified by:
readXACommit_ in class Connection
Throws:
SqlException

writeXARollback_

protected void writeXARollback_()
                         throws SqlException
Invokes writeRollback on NetXAConnection

Specified by:
writeXARollback_ in class Connection
Throws:
SqlException

readXARollback_

protected void readXARollback_()
                        throws SqlException
Invokes writeRollback on NetXAConnection

Specified by:
readXARollback_ in class Connection
Throws:
SqlException

writeXATransactionStart

protected void writeXATransactionStart(Statement statement)
                                throws SqlException
Specified by:
writeXATransactionStart in class Connection
Throws:
SqlException

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

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