| java.lang.Object org.apache.derby.client.am.Connection org.apache.derby.client.net.NetConnection org.apache.derby.client.net.NetConnection40
Constructor Summary | |
public | NetConnection40(NetLogWriter netLogWriter, String databaseName, java.util.Properties properties) | public | NetConnection40(NetLogWriter netLogWriter, org.apache.derby.jdbc.ClientBaseDataSource dataSource, String user, String password) | public | NetConnection40(NetLogWriter netLogWriter, int driverManagerLoginTimeout, String serverName, int portNumber, String databaseName, java.util.Properties properties) | public | NetConnection40(NetLogWriter netLogWriter, String user, String password, org.apache.derby.jdbc.ClientBaseDataSource dataSource, int rmId, boolean isXAConn) | public | NetConnection40(NetLogWriter netLogWriter, String ipaddr, int portNumber, org.apache.derby.jdbc.ClientBaseDataSource dataSource, boolean isXAConn) | public | NetConnection40(NetLogWriter netLogWriter, String user, String password, org.apache.derby.jdbc.ClientBaseDataSource 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. |
NetConnection40 | public NetConnection40(NetLogWriter netLogWriter, String user, String password, org.apache.derby.jdbc.ClientBaseDataSource dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc) throws SqlException(Code) | | The constructor for the NetConnection40 class which contains
implementations of JDBC 4.0 specific methods in the java.sql.Connection
interface. 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. Parameters: user - user id for this connection. Parameters: password - password for this connection. Parameters: dataSource - The DataSource object passed from the PooledConnection object from which this constructor was called. Parameters: rmId - The Resource manager ID for XA Connections Parameters: isXAConn - true if this is a XA connection. Parameters: cpc - The ClientPooledConnection object from which this NetConnection constructor was called. This is usedto pass StatementEvents back to the pooledConnectionobject. throws: SqlException - |
close | public synchronized void close() throws SQLException(Code) | | Close the connection and release its resources.
exception: SQLException - if a database-access error occurs. |
createBlob | public Blob createBlob() throws SQLException(Code) | | Constructs an object that implements the Clob interface. The object
returned initially contains no data.
An object that implements the Clob interface throws: SQLException - if an object that implements theClob interface can not be constructed. |
createClob | public Clob createClob() throws SQLException(Code) | | Constructs an object that implements the Clob interface. The object
returned initially contains no data.
An object that implements the Clob interface throws: SQLException - if an object that implements theClob interface can not be constructed. |
getClientInfo | public String getClientInfo(String name) throws SQLException(Code) | | getClientInfo always returns a
null String since Derby doesn't support
ClientInfoProperties.
Parameters: name - a String value a null String value exception: SQLException - if the connection is closed. |
getClientInfo | public Properties getClientInfo() throws SQLException(Code) | | getClientInfo always returns an empty
Properties object since Derby doesn't support
ClientInfoProperties.
an empty Properties object. exception: SQLException - if the connection is closed. |
isValid | public boolean isValid(int timeout) throws SQLException(Code) | | Checks if the connection has not been closed and is still valid.
The validity is checked by running a simple query against the
database.
The timeout specified by the caller is implemented as follows:
On the server: uses the queryTimeout functionality to make the
query time out on the server in case the server has problems or
is highly loaded.
On the client: uses a timeout on the socket to make sure that
the client is not blocked forever in the cases where the server
is "hanging" or not sending the reply.
Parameters: timeout - The time in seconds to wait for the databaseoperation 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. true if the connection is valid, false otherwise exception: SQLException - if the parameter value is illegal or if adatabase error has occured |
isWrapperFor | public boolean isWrapperFor(Class> interfaces) throws SQLException(Code) | | Returns false unless interfaces is implemented
Parameters: interfaces - a Class defining an interface. true if this implements the interface or directly or indirectly wraps an object that does. throws: java.sql.SQLException - if an error occurs while determining whether this is a wrapper for an object with the given interface. |
setClientInfo | public void setClientInfo(String name, String value) throws SQLClientInfoException(Code) | | setClientInfo will always throw a
SQLClientInfoException since Derby does not support
any properties.
Parameters: name - a property key String Parameters: value - a property value String exception: SQLException - always. |
setClientInfo | public void setClientInfo(Properties properties) throws SQLClientInfoException(Code) | | setClientInfo will throw a
SQLClientInfoException uless the properties
paramenter 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.
Parameters: properties - a Properties object with theproperties to set. exception: SQLClientInfoException - unless the propertiesparameter is null or empty. |
unwrap | public T unwrap(java.lang.Class<T> interfaces) throws SQLException(Code) | | Returns this if this class implements the interface
Parameters: interfaces - a Class defining an interface an object that implements the interface throws: java.sql.SQLException - if no object if found that implements the interface |
Methods inherited from org.apache.derby.client.net.NetConnection | public void addSpecialRegisters(String s)(Code)(Java Doc) protected boolean allowCloseInUOW_()(Code)(Java Doc) protected boolean allowLocalCommitRollback_() throws org.apache.derby.client.am.SqlException(Code)(Java Doc) protected int checkAlternateServerHasEqualOrHigherProductLevel(ProductLevel orgLvl, int orgServerType)(Code)(Java Doc) protected void checkResetPreconditions(org.apache.derby.client.am.LogWriter logWriter, String user, String password, ClientBaseDataSource ds) throws SqlException(Code)(Java Doc) public synchronized void close() throws SQLException(Code)(Java Doc) public synchronized void closeForReuse() throws SqlException(Code)(Java Doc) public synchronized void closeResources() throws SQLException(Code)(Java Doc) public synchronized void closeX() throws SQLException(Code)(Java Doc) public void completeConnect() throws SqlException(Code)(Java Doc) protected void completeReset(boolean isDeferredReset, boolean recomputeFromDataSource) throws SqlException(Code)(Java Doc) protected void constructCrrtkn() throws SqlException(Code)(Java Doc) protected boolean doCloseStatementsOnClose_()(Code)(Java Doc) public void doResetNow() throws SqlException(Code)(Java Doc) protected void finalize() throws java.lang.Throwable(Code)(Java Doc) public void flowConnect(String password, int securityMechanism) throws SqlException(Code)(Java Doc) protected boolean flowReconnect(String password, int securityMechanism) throws SqlException(Code)(Java Doc) protected void flowSimpleConnect() throws SqlException(Code)(Java Doc) public int getAGENT()(Code)(Java Doc) public int getCMNTCPIP()(Code)(Java Doc) protected byte[] getCnnToken()(Code)(Java Doc) public EncryptionManager getEncryptionManager()(Code)(Java Doc) public java.io.InputStream getInputStream()(Code)(Java Doc) public java.io.OutputStream getOutputStream()(Code)(Java Doc) public String getProductID()(Code)(Java Doc) public int getRDB()(Code)(Java Doc) public int getRSYNCMGR()(Code)(Java Doc) public int getSECMGR()(Code)(Java Doc) public int getSQLAM()(Code)(Java Doc) public int getSYNCPTMGR()(Code)(Java Doc) public int getSecurityMechanism()(Code)(Java Doc) protected short getSequenceNumber()(Code)(Java Doc) protected int getSocketAndInputOutputStreams(String server, int port)(Code)(Java Doc) java.util.List getSpecialRegisters()(Code)(Java Doc) public byte[] getTargetPublicKey()(Code)(Java Doc) public int getXAMGR()(Code)(Java Doc) public boolean isConnectionNull()(Code)(Java Doc) protected boolean isGlobalPending_()(Code)(Java Doc) public boolean isOpen()(Code)(Java Doc) protected void markClosed_()(Code)(Java Doc) protected org.apache.derby.client.am.Agent newAgent_(org.apache.derby.client.am.LogWriter logWriter, int loginTimeout, String serverName, int portNumber) throws SqlException(Code)(Java Doc) protected CallableStatement newCallableStatement_(String sql, int type, int concurrency, int holdability) throws SqlException(Code)(Java Doc) protected DatabaseMetaData newDatabaseMetaData_()(Code)(Java Doc) protected PreparedStatement newPositionedUpdatePreparedStatement_(String sql, org.apache.derby.client.am.Section section) throws SqlException(Code)(Java Doc) protected PreparedStatement newPreparedStatement_(String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames) throws SqlException(Code)(Java Doc) public org.apache.derby.client.am.SectionManager newSectionManager(String collection, org.apache.derby.client.am.Agent agent, String databaseName)(Code)(Java Doc) protected Statement newStatement_(int type, int concurrency, int holdability) throws SqlException(Code)(Java Doc) void rdbAccessed(int svrcod, String prdid, boolean crrtknReceived, byte[] crrtkn)(Code)(Java Doc) public void readCommitSubstitute_() throws SqlException(Code)(Java Doc) void readDeferredReset() throws SqlException(Code)(Java Doc) public void readLocalCommit_() throws SqlException(Code)(Java Doc) public void readLocalRollback_() throws SqlException(Code)(Java Doc) public void readLocalXACommit_() throws SqlException(Code)(Java Doc) public void readLocalXARollback_() throws SqlException(Code)(Java Doc) public void readLocalXAStart_() throws SqlException(Code)(Java Doc) public void readTransactionStart() throws SqlException(Code)(Java Doc) protected void readXACommit_() throws SqlException(Code)(Java Doc) protected void readXARollback_() throws SqlException(Code)(Java Doc) protected void resetCallableStatement_(CallableStatement cs, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SqlException(Code)(Java Doc) public void resetNetConnection(org.apache.derby.client.am.LogWriter logWriter, String user, String password, org.apache.derby.jdbc.ClientBaseDataSource ds, boolean recomputeFromDataSource) throws SqlException(Code)(Java Doc) protected void resetPreparedStatement_(PreparedStatement ps, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, int autoGeneratedKeys, String[] columnNames) throws SqlException(Code)(Java Doc) protected void resetStatement_(Statement statement, int type, int concurrency, int holdability) throws SqlException(Code)(Java Doc) protected void reset_(org.apache.derby.client.am.LogWriter logWriter, String user, String password, ClientBaseDataSource ds, boolean recomputeFromDataSource) throws SqlException(Code)(Java Doc) protected void reset_(org.apache.derby.client.am.LogWriter logWriter, ClientBaseDataSource ds, boolean recomputeFromDataSource) throws SqlException(Code)(Java Doc) void securityCheckComplete(int svrcod, int secchkcd)(Code)(Java Doc) final public boolean serverSupportsQryclsimp()(Code)(Java Doc) void setAccessSecurityData(int secchkcd, int desiredSecmec, int[] secmecList, boolean sectknReceived, byte[] sectkn) throws DisconnectException(Code)(Java Doc) public void setConnectionNull(boolean connectionNull)(Code)(Java Doc) public void setIndoubtTransactions(java.util.Hashtable indoubtTransactions)(Code)(Java Doc) public void setInputStream(java.io.InputStream inputStream)(Code)(Java Doc) public void setOutputStream(java.io.OutputStream outputStream)(Code)(Java Doc) protected void setReadOnlyTransactionFlag(boolean flag)(Code)(Java Doc) void setServerAttributeData(String extnam, String srvclsnm, String srvnam, String srvrlslv)(Code)(Java Doc) public boolean willAutoCommitGenerateFlow()(Code)(Java Doc) public void writeCommitSubstitute_() throws SqlException(Code)(Java Doc) void writeDeferredReset() throws SqlException(Code)(Java Doc) public void writeLocalCommit_() throws SqlException(Code)(Java Doc) public void writeLocalRollback_() throws SqlException(Code)(Java Doc) public void writeLocalXACommit_() throws SqlException(Code)(Java Doc) public void writeLocalXARollback_() throws SqlException(Code)(Java Doc) public void writeLocalXAStart_() throws SqlException(Code)(Java Doc) public void writeTransactionStart(Statement statement) throws SqlException(Code)(Java Doc) protected void writeXACommit_() throws SqlException(Code)(Java Doc) protected void writeXARollback_() throws SqlException(Code)(Java Doc) protected void writeXATransactionStart(Statement statement) throws SqlException(Code)(Java Doc)
|
Methods inherited from org.apache.derby.client.am.Connection | public void accumulate440WarningForMessageProcFailure(SqlWarning e)(Code)(Java Doc) public void accumulate444WarningForMessageProcFailure(SqlWarning e)(Code)(Java Doc) public void accumulateWarning(SqlWarning e)(Code)(Java Doc) abstract public void addSpecialRegisters(String s)(Code)(Java Doc) abstract protected boolean allowCloseInUOW_()(Code)(Java Doc) abstract protected boolean allowLocalCommitRollback_() throws org.apache.derby.client.am.SqlException(Code)(Java Doc) protected void checkForClosedConnection() throws SqlException(Code)(Java Doc) public synchronized void clearWarnings() throws SQLException(Code)(Java Doc) public void clearWarningsX() throws SqlException(Code)(Java Doc) public synchronized void close() throws SQLException(Code)(Java Doc) public synchronized void closeForReuse() throws SqlException(Code)(Java Doc) public synchronized void closeResources() throws SQLException(Code)(Java Doc) public synchronized void closeX() throws SQLException(Code)(Java Doc) public synchronized void commit() throws SQLException(Code)(Java Doc) public void completeAbnormalUnitOfWork()(Code)(Java Doc) public void completeAbnormalUnitOfWork(UnitOfWorkListener uwl)(Code)(Java Doc) public void completeChainBreakingDisconnect()(Code)(Java Doc) public void completeConnect() throws SqlException(Code)(Java Doc) public void completeLocalCommit()(Code)(Java Doc) public void completeLocalRollback()(Code)(Java Doc) protected void completeReset(boolean isDeferredReset, boolean recomputeFromDataSource) throws SqlException(Code)(Java Doc) public void completeSpecificRollback(UnitOfWorkListener uwl)(Code)(Java Doc) public void completeSqlca(Sqlca sqlca)(Code)(Java Doc) public synchronized java.sql.Statement createStatement() throws SQLException(Code)(Java Doc) public synchronized java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) public synchronized java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code)(Java Doc) abstract protected boolean doCloseStatementsOnClose_()(Code)(Java Doc) protected void finalize() throws java.lang.Throwable(Code)(Java Doc) public boolean flowAutoCommit() throws SqlException(Code)(Java Doc) public void flowCommit() throws SqlException(Code)(Java Doc) protected void flowRollback() throws SqlException(Code)(Java Doc) public boolean getAutoCommit() throws SQLException(Code)(Java Doc) public String getCatalog() throws SQLException(Code)(Java Doc) public int getHoldability() throws SQLException(Code)(Java Doc) public java.sql.DatabaseMetaData getMetaData() throws SQLException(Code)(Java Doc) public int getServerVersion()(Code)(Java Doc) public int getTransactionIsolation() throws SQLException(Code)(Java Doc) public java.util.Map getTypeMap() throws SQLException(Code)(Java Doc) public java.sql.SQLWarning getWarnings() throws SQLException(Code)(Java Doc) public int getXAState()(Code)(Java Doc) protected void initConnection(org.apache.derby.client.am.LogWriter logWriter, String user, org.apache.derby.jdbc.ClientBaseDataSource dataSource) throws SqlException(Code)(Java Doc) public boolean isClosed()(Code)(Java Doc) public boolean isClosedX()(Code)(Java Doc) abstract protected boolean isGlobalPending_()(Code)(Java Doc) public boolean isPhysicalConnClosed()(Code)(Java Doc) public boolean isReadOnly() throws SQLException(Code)(Java Doc) public boolean isXAConnection()(Code)(Java Doc) public synchronized void lightReset() throws SqlException(Code)(Java Doc) public void markClosed()(Code)(Java Doc) abstract protected void markClosed_()(Code)(Java Doc) public String nativeSQL(String sql) throws SQLException(Code)(Java Doc) public synchronized String nativeSQLX(String sql) throws SqlException(Code)(Java Doc) abstract protected Agent newAgent_(LogWriter logWriter, int loginTimeout, String serverName, int portNumber) throws SqlException(Code)(Java Doc) abstract protected CallableStatement newCallableStatement_(String sql, int type, int concurrency, int holdability) throws SqlException(Code)(Java Doc) abstract protected DatabaseMetaData newDatabaseMetaData_()(Code)(Java Doc) abstract protected PreparedStatement newPositionedUpdatePreparedStatement_(String sql, Section section) throws SqlException(Code)(Java Doc) abstract protected PreparedStatement newPreparedStatement_(String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames) throws SqlException(Code)(Java Doc) abstract public SectionManager newSectionManager(String collection, Agent agent, String databaseName)(Code)(Java Doc) abstract protected Statement newStatement_(int type, int concurrency, int holdability) throws SqlException(Code)(Java Doc) public synchronized java.sql.CallableStatement prepareCall(String sql) throws SQLException(Code)(Java Doc) public synchronized java.sql.CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) public synchronized java.sql.CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code)(Java Doc) public synchronized CallableStatement prepareMessageProc(String sql) throws SqlException(Code)(Java Doc) public synchronized PreparedStatement preparePositionedUpdateStatement(String sql, Section querySection) throws SqlException(Code)(Java Doc) public synchronized java.sql.PreparedStatement prepareStatement(String sql) throws SQLException(Code)(Java Doc) public synchronized java.sql.PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) public synchronized java.sql.PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement prepareStatement(String sql, int columnIndexes) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement prepareStatement(String sql, String columnNames) throws SQLException(Code)(Java Doc) public void readCommit() throws SqlException(Code)(Java Doc) abstract public void readCommitSubstitute_() throws SqlException(Code)(Java Doc) abstract public void readLocalCommit_() throws SqlException(Code)(Java Doc) abstract public void readLocalRollback_() throws SqlException(Code)(Java Doc) abstract public void readLocalXACommit_() throws SqlException(Code)(Java Doc) abstract public void readLocalXARollback_() throws SqlException(Code)(Java Doc) abstract public void readLocalXAStart_() throws SqlException(Code)(Java Doc) public void readRollback() throws SqlException(Code)(Java Doc) public void readTransactionStart() throws SqlException(Code)(Java Doc) abstract protected void readXACommit_() throws SqlException(Code)(Java Doc) abstract protected void readXARollback_() throws SqlException(Code)(Java Doc) public synchronized void releaseSavepoint(java.sql.Savepoint savepoint) throws SQLException(Code)(Java Doc) public synchronized void reset(LogWriter logWriter, String user, String password, ClientBaseDataSource ds, boolean recomputeFromDataSource) throws SqlException(Code)(Java Doc) public synchronized void reset(LogWriter logWriter, ClientBaseDataSource ds, boolean recomputeFromDataSource) throws SqlException(Code)(Java Doc) abstract protected void resetCallableStatement_(CallableStatement cs, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SqlException(Code)(Java Doc) protected void resetConnection(LogWriter logWriter, String user, ClientBaseDataSource ds, boolean recomputeFromDataSource) throws SqlException(Code)(Java Doc) protected void resetConnection(LogWriter logWriter, String databaseName, java.util.Properties properties) throws SqlException(Code)(Java Doc) protected void resetPrepareCall(CallableStatement cs) throws SqlException(Code)(Java Doc) protected void resetPrepareStatement(PreparedStatement ps) throws SqlException(Code)(Java Doc) abstract protected void resetPreparedStatement_(PreparedStatement ps, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, int autoGeneratedKeys, String[] columnNames) throws SqlException(Code)(Java Doc) protected void resetStatement(Statement s) throws SqlException(Code)(Java Doc) abstract protected void resetStatement_(Statement statement, int type, int concurrency, int holdability) throws SqlException(Code)(Java Doc) abstract protected void reset_(LogWriter logWriter, String user, String password, ClientBaseDataSource ds, boolean recomputerFromDataSource) throws SqlException(Code)(Java Doc) abstract protected void reset_(LogWriter logWriter, ClientBaseDataSource ds, boolean recomputerFromDataSource) throws SqlException(Code)(Java Doc) public synchronized void rollback() throws SQLException(Code)(Java Doc) public synchronized void rollback(java.sql.Savepoint savepoint) throws SQLException(Code)(Java Doc) public synchronized void setAutoCommit(boolean autoCommit) throws SQLException(Code)(Java Doc) public synchronized void setCatalog(String catalog) throws SQLException(Code)(Java Doc) public synchronized void setHoldability(int holdability) throws SQLException(Code)(Java Doc) public void setInUnitOfWork(boolean inUnitOfWork)(Code)(Java Doc) public synchronized void setReadOnly(boolean readOnly) throws SQLException(Code)(Java Doc) public synchronized java.sql.Savepoint setSavepoint() throws SQLException(Code)(Java Doc) public synchronized java.sql.Savepoint setSavepoint(String name) throws SQLException(Code)(Java Doc) public synchronized void setTransactionIsolation(int level) throws SQLException(Code)(Java Doc) public synchronized void setTypeMap(java.util.Map map) throws SQLException(Code)(Java Doc) public void setXAState(int state)(Code)(Java Doc) public boolean transactionInProgress()(Code)(Java Doc) public boolean willAutoCommitGenerateFlow() throws org.apache.derby.client.am.SqlException(Code)(Java Doc) public void writeCommit() throws SqlException(Code)(Java Doc) abstract public void writeCommitSubstitute_() throws SqlException(Code)(Java Doc) abstract public void writeLocalCommit_() throws SqlException(Code)(Java Doc) abstract public void writeLocalRollback_() throws SqlException(Code)(Java Doc) abstract public void writeLocalXACommit_() throws SqlException(Code)(Java Doc) abstract public void writeLocalXARollback_() throws SqlException(Code)(Java Doc) abstract public void writeLocalXAStart_() throws SqlException(Code)(Java Doc) public void writeRollback() throws SqlException(Code)(Java Doc) public void writeTransactionStart(Statement statement) throws SqlException(Code)(Java Doc) abstract protected void writeXACommit_() throws SqlException(Code)(Java Doc) abstract protected void writeXARollback_() throws SqlException(Code)(Java Doc) abstract protected void writeXATransactionStart(Statement statement) throws SqlException(Code)(Java Doc)
|
|
|