net.sourceforge.jtds.jdbc
Class ConnectionJDBC3
java.lang.Object
|
+--net.sourceforge.jtds.jdbc.ConnectionJDBC2
|
+--net.sourceforge.jtds.jdbc.ConnectionJDBC3
- All Implemented Interfaces:
- java.sql.Connection
- public class ConnectionJDBC3
- extends ConnectionJDBC2
Implements JDBC 3.0 specific functionality. Separated from ConnectionJDBC2
in order to allow the same classes to run under both J2SE 1.3
(ConnectionJDBC2
)and 1.4 (ConnectionJDBC3
).
- Version:
- $Id: ConnectionJDBC3.java,v 1.15 2005/10/27 13:22:33 alin_sinpalean Exp $
- Author:
- Alin Sinpalean, Brian Heineman, Mike Hutchinson
Field Summary |
private int |
savepointId
Counter for generating unique savepoint identifiers |
private java.util.Map |
savepointProcInTran
Maps each savepoint to a list of tmep procedures created since the savepoint |
private java.util.ArrayList |
savepoints
The list of savepoints. |
Fields inherited from class net.sourceforge.jtds.jdbc.ConnectionJDBC2 |
appName, autoCommit, baseTds, batchSize, bindAddress, bufferDir, bufferMaxMemory, bufferMinPackets, cachedTds, charsetInfo, charsetSpecified, closed, collation, currentDatabase, cursorSequenceNo, databaseMajorVersion, databaseMinorVersion, databaseName, databaseProductName, databaseProductVersion, domainName, instanceName, language, lastUpdateCount, lobBuffer, loginTimeout, macAddress, maxPrecision, maxStatements, messages, mutex, namedPipe, netPacketSize, packetSize, password, portNumber, prepareSql, procInTran, progName, readOnly, rowCount, serverCharset, serverName, serverType, socket, socketTimeout, spSequenceNo, SQL_SERVER_65_CHARSET_QUERY, SQL_SERVER_INITIAL_SQL, ssl, statementCache, statements, SYBASE_INITIAL_SQL, SYBASE_SERVER_CHARSET_QUERY, sybaseInfo, tcpNoDelay, tdsVersion, textSize, TRANSACTION_SNAPSHOT, transactionIsolation, url, useCursors, useJCIFS, useLOBs, useMetadataCache, useNTLMv2, user, useUnicode, wsid, xaEmulation, xaState, xaTransaction, xid |
Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Constructor Summary |
(package private) |
ConnectionJDBC3(java.lang.String url,
java.util.Properties props)
Create a new database connection. |
Methods inherited from class net.sourceforge.jtds.jdbc.ConnectionJDBC2 |
addStatement, checkLocal, checkOpen, clearWarnings, close, commit, createNamedPipe, createStatement, createStatement, createStatement, determineServerCharset, enlistConnection, getAppName, getAutoCommit, getBatchSize, getBindAddress, getBufferDir, getBufferMaxMemory, getBufferMinPackets, getCachedTds, getCatalog, getCharset, getCharsetInfo, getCollation, getCursorName, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseName, getDatabaseProductName, getDatabaseProductVersion, getDomainName, getHoldability, getInstanceName, getLastUpdateCount, getLobBuffer, getLoginTimeout, getMacAddress, getMaxPrecision, getMaxStatements, getMetaData, getMutex, getNamedPipe, getNetPacketSize, getPacketSize, getPassword, getPortNumber, getPrepareSql, getProcName, getProgName, getRmHost, getRowCount, getServerName, getServerType, getSocket, getSocketTimeout, getSybaseInfo, getTcpNoDelay, getTdsVersion, getTextSize, getTransactionIsolation, getTypeMap, getURL, getUseCursors, getUseJCIFS, getUseLOBs, getUseMetadataCache, getUseNTLMv2, getUser, getUseUnicode, getWarnings, getWsid, getXaState, getXid, isCharsetSpecified, isClosed, isReadOnly, isWideChar, isXaEmulation, loadCharset, loadCharset, nativeSQL, notImplemented, parseIntegerProperty, parseLongProperty, prepareCall, prepareCall, prepareCall, prepareSQL, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseTds, removeCachedProcedure, removeStatement, rollback, sendXaPacket, setAutoCommit, setCatalog, setClosed, setCollation, setDatabase, setDBServerInfo, setHoldability, setNetPacketSize, setReadOnly, setRowCount, setServerCharset, setSybaseInfo, setTextSize, setTransactionIsolation, setTypeMap, setXaState, setXid, unpackProperties |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
savepoints
private java.util.ArrayList savepoints
- The list of savepoints.
savepointProcInTran
private java.util.Map savepointProcInTran
- Maps each savepoint to a list of tmep procedures created since the savepoint
savepointId
private int savepointId
- Counter for generating unique savepoint identifiers
ConnectionJDBC3
ConnectionJDBC3(java.lang.String url,
java.util.Properties props)
throws java.sql.SQLException
- Create a new database connection.
- Parameters:
url
- The connection URL starting jdbc:jtds:.props
- The additional connection properties.- Throws:
java.sql.SQLException
-
setSavepoint
private void setSavepoint(SavepointImpl savepoint)
throws java.sql.SQLException
- Add a savepoint to the list maintained by this connection.
- Parameters:
savepoint
- The savepoint object to add.- Throws:
java.sql.SQLException
-
clearSavepoints
void clearSavepoints()
- Releases all savepoints. Used internally when committing or rolling back
a transaction.
- Overrides:
clearSavepoints
in class ConnectionJDBC2
releaseSavepoint
public void releaseSavepoint(java.sql.Savepoint savepoint)
throws java.sql.SQLException
- Overrides:
releaseSavepoint
in class ConnectionJDBC2
rollback
public void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
- Overrides:
rollback
in class ConnectionJDBC2
setSavepoint
public java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
- Overrides:
setSavepoint
in class ConnectionJDBC2
setSavepoint
public java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
- Overrides:
setSavepoint
in class ConnectionJDBC2
getNextSavepointId
private int getNextSavepointId()
- Returns the next savepoint identifier.
- Returns:
- the next savepoint identifier
addCachedProcedure
void addCachedProcedure(java.lang.String key,
ProcEntry proc)
- Add a stored procedure to the cache.
- Overrides:
addCachedProcedure
in class ConnectionJDBC2
- Parameters:
key
- The signature of the procedure to cache.proc
- The stored procedure descriptor.
addCachedProcedure
void addCachedProcedure(java.lang.String key)
- Add a stored procedure to the savepoint cache.
- Parameters:
key
- The signature of the procedure to cache.
Generated on August 22 2007