Package net.sourceforge.jtds.jdbc
Class ConnectionJDBC3
- java.lang.Object
-
- net.sourceforge.jtds.jdbc.ConnectionJDBC2
-
- net.sourceforge.jtds.jdbc.ConnectionJDBC3
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.sql.Connection
,java.sql.Wrapper
public class ConnectionJDBC3 extends ConnectionJDBC2
Implements JDBC 3.0 specific functionality. Separated fromConnectionJDBC2
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.2.2 2009/07/26 17:15:05 ickzon Exp $
- Author:
- Alin Sinpalean, Brian Heineman, Mike Hutchinson
- Created:
- March 30, 2004
-
-
Field Summary
Fields Modifier and Type Field Description private int
savepointId
Counter for generating unique savepoint identifiersprivate java.util.Map
savepointProcInTran
Maps each savepoint to a list of tmep procedures created since the savepointprivate java.util.ArrayList
savepoints
The list of savepoints.-
Fields inherited from class net.sourceforge.jtds.jdbc.ConnectionJDBC2
TRANSACTION_SNAPSHOT
-
-
Constructor Summary
Constructors Constructor Description ConnectionJDBC3(java.lang.String url, java.util.Properties props)
Create a new database connection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addCachedProcedure(java.lang.String key)
Add a stored procedure to the savepoint cache.(package private) void
addCachedProcedure(java.lang.String key, ProcEntry proc)
Add a stored procedure to the cache.(package private) void
clearSavepoints()
Releases all savepoints.private int
getNextSavepointId()
Returns the next savepoint identifier.void
releaseSavepoint(java.sql.Savepoint savepoint)
void
rollback(java.sql.Savepoint savepoint)
java.sql.Savepoint
setSavepoint()
java.sql.Savepoint
setSavepoint(java.lang.String name)
private void
setSavepoint(SavepointImpl savepoint)
Add a savepoint to the list maintained by this connection.-
Methods inherited from class net.sourceforge.jtds.jdbc.ConnectionJDBC2
abort, addStatement, checkLocal, checkOpen, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, enlistConnection, finalize, getAppName, getAutoCommit, getBatchSize, getBindAddress, getBufferDir, getBufferMaxMemory, getBufferMinPackets, getCachedTds, getCatalog, getCharset, getCharsetInfo, getClientInfo, getClientInfo, getCollation, getCursorName, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseName, getDatabaseProductName, getDatabaseProductVersion, getDomainName, getHoldability, getInstanceName, getLastUpdateCount, getLobBuffer, getLoginTimeout, getMacAddress, getMaxPrecision, getMaxStatements, getMetaData, getMutex, getNamedPipe, getNetPacketSize, getNetworkTimeout, getPacketSize, getPassword, getPortNumber, getPrepareSql, getProcessId, getProcName, getProgName, getRmHost, getRowCount, getSchema, getServerName, getServerType, getSocket, getSocketKeepAlive, getSocketTimeout, getSybaseInfo, getTcpNoDelay, getTdsVersion, getTextSize, getTransactionIsolation, getTypeMap, getURL, getUseCursors, getUseJCIFS, getUseLOBs, getUseMetadataCache, getUseNTLMv2, getUser, getUseUnicode, getWarnings, getWsid, getXaState, getXid, isCharsetSpecified, isClosed, isReadOnly, isValid, isWideChar, isWrapperFor, isXaEmulation, nativeSQL, notImplemented, prepareCall, prepareCall, prepareCall, prepareSQL, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseTds, removeCachedProcedure, removeStatement, rollback, sendXaPacket, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setClosed, setCollation, setDatabase, setDBServerInfo, setHoldability, setNetPacketSize, setNetworkTimeout, setReadOnly, setRowCount, setSchema, setServerCharset, setSybaseInfo, setTextSize, setTransactionIsolation, setTypeMap, setXaState, setXid, unpackProperties, unwrap
-
-
-
-
Field Detail
-
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
-
-
Method Detail
-
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 classConnectionJDBC2
-
releaseSavepoint
public void releaseSavepoint(java.sql.Savepoint savepoint) throws java.sql.SQLException
- Specified by:
releaseSavepoint
in interfacejava.sql.Connection
- Overrides:
releaseSavepoint
in classConnectionJDBC2
- Throws:
java.sql.SQLException
-
rollback
public void rollback(java.sql.Savepoint savepoint) throws java.sql.SQLException
- Specified by:
rollback
in interfacejava.sql.Connection
- Overrides:
rollback
in classConnectionJDBC2
- Throws:
java.sql.SQLException
-
setSavepoint
public java.sql.Savepoint setSavepoint() throws java.sql.SQLException
- Specified by:
setSavepoint
in interfacejava.sql.Connection
- Overrides:
setSavepoint
in classConnectionJDBC2
- Throws:
java.sql.SQLException
-
setSavepoint
public java.sql.Savepoint setSavepoint(java.lang.String name) throws java.sql.SQLException
- Specified by:
setSavepoint
in interfacejava.sql.Connection
- Overrides:
setSavepoint
in classConnectionJDBC2
- Throws:
java.sql.SQLException
-
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 classConnectionJDBC2
- 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.
-
-