public class NetConnection40 extends NetConnection
Modifier and Type | Field and Description |
---|---|
private java.sql.PreparedStatement |
isValidStmt
Prepared statement that is used each time isValid() is called on this
connection.
|
cnntkn_, crrtkn_, currXACallInfoOffset_, extnam_, indoubtTransactions_, msgutil, netAgent_, pendingEndXACallinfoOffset_, publicKey_, readOnlyTransaction_, securityMechanism_, sourceSeed_, targetAgent_, targetCmnappc_, targetCmntcpip_, targetExtnam_, targetPublicKey_, targetRdb_, targetRsyncmgr_, targetSecmec_, targetSecmgr_, targetSeed_, targetSrvclsnm_, targetSrvnam_, targetSrvrlslv_, targetSyncptmgr_, targetUnicodemgr_, targetXamgr_, xares_
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_
Constructor and Description |
---|
NetConnection40(NetLogWriter netLogWriter,
ClientBaseDataSourceRoot dataSource,
java.lang.String user,
java.lang.String password) |
NetConnection40(NetLogWriter netLogWriter,
int driverManagerLoginTimeout,
java.lang.String serverName,
int portNumber,
java.lang.String databaseName,
java.util.Properties properties) |
NetConnection40(NetLogWriter netLogWriter,
java.lang.String ipaddr,
int portNumber,
ClientBaseDataSourceRoot dataSource,
boolean isXAConn) |
NetConnection40(NetLogWriter netLogWriter,
java.lang.String databaseName,
java.util.Properties properties) |
NetConnection40(NetLogWriter netLogWriter,
java.lang.String user,
java.lang.String password,
ClientBaseDataSourceRoot dataSource,
int rmId,
boolean isXAConn) |
NetConnection40(NetLogWriter netLogWriter,
java.lang.String user,
java.lang.String password,
ClientBaseDataSourceRoot dataSource,
int rmId,
boolean isXAConn,
ClientPooledConnection cpc)
The constructor for the NetConnection40 class which contains
implementations of JDBC 4.0 specific methods in the java.sql.Connection
interface.
|
Modifier and Type | Method and Description |
---|---|
void |
abort(java.util.concurrent.Executor executor) |
void |
close()
Close the connection and release its resources.
|
java.sql.Array |
createArrayOf(java.lang.String typeName,
java.lang.Object[] elements) |
java.sql.NClob |
createNClob() |
java.sql.SQLXML |
createSQLXML() |
java.sql.Struct |
createStruct(java.lang.String typeName,
java.lang.Object[] attributes) |
java.util.Properties |
getClientInfo()
getClientInfo always returns an empty
Properties object since Derby doesn't support
ClientInfoProperties. |
java.lang.String |
getClientInfo(java.lang.String name)
getClientInfo always returns a
null String since Derby doesn't support
ClientInfoProperties. |
int |
getNetworkTimeout() |
boolean |
isValid(int timeout)
Checks if the connection has not been closed and is still valid.
|
boolean |
isWrapperFor(java.lang.Class<?> interfaces)
Returns false unless
interfaces is implemented |
void |
setClientInfo(java.util.Properties properties)
setClientInfo will throw a
SQLClientInfoException unless the properties
parameter is empty, since Derby does not support any
properties. |
void |
setClientInfo(java.lang.String name,
java.lang.String value)
setClientInfo will always throw a
SQLClientInfoException since Derby does not support
any properties. |
void |
setNetworkTimeout(java.util.concurrent.Executor executor,
int milliseconds) |
<T> T |
unwrap(java.lang.Class<T> interfaces)
Returns
this if this class implements the interface |
addSpecialRegisters, allowCloseInUOW_, allowLocalCommitRollback_, closeForReuse, closeResources, closeX, completeConnect, completeReset, constructCrrtkn, doCloseStatementsOnClose_, doResetNow, finalize, flowConnect, flowReconnect, flowSimpleConnect, getAGENT, getCMNTCPIP, getCnnToken, getEncryptionManager, getInputStream, getOutputStream, getProductID, getRDB, getRSYNCMGR, getSECMGR, getSecurityMechanism, getSequenceNumber, getSpecialRegisters, getSQLAM, getSYNCPTMGR, getTargetPublicKey, getXAMGR, isConnectionNull, isGlobalPending_, isOpen, markClosed_, newAgent_, newCallableStatement_, newDatabaseMetaData_, newPositionedUpdatePreparedStatement_, newPreparedStatement_, newSectionManager, newStatement_, rdbAccessed, readCommitSubstitute_, readDeferredReset, readLocalCommit_, readLocalRollback_, readLocalXACommit_, readLocalXARollback_, readLocalXAStart_, readTransactionStart, readXACommit_, readXARollback_, reset_, resetCallableStatement_, resetNetConnection, resetPreparedStatement_, resetStatement_, securityCheckComplete, serverSupportsBooleanValues, serverSupportsEXTDTAAbort, serverSupportsLayerBStreaming, serverSupportsLocators, serverSupportsQryclsimp, serverSupportsTimestampNanoseconds, serverSupportsUDTs, serverSupportsUtf8Ccsid, setAccessSecurityData, setConnectionNull, setIndoubtTransactions, setInputStream, setOutputStream, setReadOnlyTransactionFlag, setServerAttributeData, supportsSessionDataCaching, willAutoCommitGenerateFlow, writeCommitSubstitute_, writeDeferredReset, writeLocalCommit_, writeLocalRollback_, writeLocalXACommit_, writeLocalXARollback_, writeLocalXAStart_, writeTransactionStart, writeXACommit_, writeXARollback_, writeXATransactionStart
accumulate440WarningForMessageProcFailure, accumulate444WarningForMessageProcFailure, accumulateWarning, beginAborting, checkForClosedConnection, clearWarnings, clearWarningsX, closeForReuse, commit, completeAbnormalUnitOfWork, completeAbnormalUnitOfWork, completeChainBreakingDisconnect, completeInitialPiggyBackIsolation, completeInitialPiggyBackSchema, completeLocalCommit, completeLocalRollback, completePiggyBackIsolation, completePiggyBackSchema, completeReset, completeSpecificRollback, completeSqlca, createBlob, createClob, createStatement, createStatement, createStatement, flowAutoCommit, flowCommit, flowRollback, getAutoCommit, getCatalog, getCurrentSchemaName, getHoldability, getMetaData, getSchema, getServerVersion, getTransactionID, getTransactionIsolation, getTransactionIsolationX, getTypeMap, getWarnings, getXAState, initConnection, isAborting, 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, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap, setXAState, transactionInProgress, writeCommit, writeRollback
private java.sql.PreparedStatement isValidStmt
public NetConnection40(NetLogWriter netLogWriter, java.lang.String databaseName, java.util.Properties properties) throws SqlException
SqlException
public NetConnection40(NetLogWriter netLogWriter, ClientBaseDataSourceRoot dataSource, java.lang.String user, java.lang.String password) throws SqlException
SqlException
public NetConnection40(NetLogWriter netLogWriter, int driverManagerLoginTimeout, java.lang.String serverName, int portNumber, java.lang.String databaseName, java.util.Properties properties) throws SqlException
SqlException
public NetConnection40(NetLogWriter netLogWriter, java.lang.String user, java.lang.String password, ClientBaseDataSourceRoot dataSource, int rmId, boolean isXAConn) throws SqlException
SqlException
public NetConnection40(NetLogWriter netLogWriter, java.lang.String ipaddr, int portNumber, ClientBaseDataSourceRoot dataSource, boolean isXAConn) throws SqlException
SqlException
public NetConnection40(NetLogWriter netLogWriter, java.lang.String user, java.lang.String password, ClientBaseDataSourceRoot dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc) throws SqlException
this
on to the associated
prepared statement object thus enabling the prepared statement object
to inturn raise the statement events to the ClientPooledConnection object.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 ConnectionsisXAConn
- 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.SqlException
public java.sql.Array createArrayOf(java.lang.String typeName, java.lang.Object[] elements) throws java.sql.SQLException
java.sql.SQLException
public java.sql.NClob createNClob() throws java.sql.SQLException
java.sql.SQLException
public java.sql.SQLXML createSQLXML() throws java.sql.SQLException
java.sql.SQLException
public java.sql.Struct createStruct(java.lang.String typeName, java.lang.Object[] attributes) throws java.sql.SQLException
java.sql.SQLException
public boolean isValid(int timeout) throws java.sql.SQLException
timeout
- The time in seconds to wait for the database
operation used to validate the connection to complete. If the
timeout period expires before the operation completes, this
method returns false. A value of 0 indicates a timeout is not
applied to the database operation.java.sql.SQLException
- if the parameter value is illegal or if a
database error has occurredpublic void close() throws java.sql.SQLException
close
in interface java.lang.AutoCloseable
close
in interface java.sql.Connection
close
in class NetConnection
java.sql.SQLException
- if a database-access error occurs.public void setClientInfo(java.lang.String name, java.lang.String value) throws java.sql.SQLClientInfoException
setClientInfo
will always throw a
SQLClientInfoException
since Derby does not support
any properties.name
- a property key String
value
- a property value String
java.sql.SQLClientInfoException
- always.public void setClientInfo(java.util.Properties properties) throws java.sql.SQLClientInfoException
setClientInfo
will throw a
SQLClientInfoException
unless the properties
parameter is empty, since Derby does not support any
properties. All the property keys in the
properties
parameter are added to failedProperties
of the exception thrown, with REASON_UNKNOWN_PROPERTY as the
value.properties
- a Properties
object with the
properties to set.java.sql.SQLClientInfoException
- unless the properties
parameter is null or empty.public java.lang.String getClientInfo(java.lang.String name) throws java.sql.SQLException
getClientInfo
always returns a
null String
since Derby doesn't support
ClientInfoProperties.name
- a String
valuenull String
valuejava.sql.SQLException
- if the connection is closed.public java.util.Properties getClientInfo() throws java.sql.SQLException
getClientInfo
always returns an empty
Properties
object since Derby doesn't support
ClientInfoProperties.Properties
object.java.sql.SQLException
- if the connection is closed.public boolean isWrapperFor(java.lang.Class<?> interfaces) throws java.sql.SQLException
interfaces
is implementedinterfaces
- a Class defining an interface.java.sql.SQLException
- if an error occurs while determining
whether this is a wrapper for an object
with the given interface.public <T> T unwrap(java.lang.Class<T> interfaces) throws java.sql.SQLException
this
if this class implements the interfaceinterfaces
- a Class defining an interfacejava.sql.SQLException
- if no object if found that implements the
interfacepublic void abort(java.util.concurrent.Executor executor) throws java.sql.SQLException
java.sql.SQLException
public int getNetworkTimeout() throws java.sql.SQLException
java.sql.SQLException
public void setNetworkTimeout(java.util.concurrent.Executor executor, int milliseconds) throws java.sql.SQLException
java.sql.SQLException
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.