Class 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 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.2.2 2009/07/26 17:15:05 ickzon Exp $
    Author:
    Alin Sinpalean, Brian Heineman, Mike Hutchinson
    Created:
    March 30, 2004
    • 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
    • Constructor Detail

      • 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
    • 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 class ConnectionJDBC2
      • releaseSavepoint

        public void releaseSavepoint​(java.sql.Savepoint savepoint)
                              throws java.sql.SQLException
        Specified by:
        releaseSavepoint in interface java.sql.Connection
        Overrides:
        releaseSavepoint in class ConnectionJDBC2
        Throws:
        java.sql.SQLException
      • rollback

        public void rollback​(java.sql.Savepoint savepoint)
                      throws java.sql.SQLException
        Specified by:
        rollback in interface java.sql.Connection
        Overrides:
        rollback in class ConnectionJDBC2
        Throws:
        java.sql.SQLException
      • setSavepoint

        public java.sql.Savepoint setSavepoint()
                                        throws java.sql.SQLException
        Specified by:
        setSavepoint in interface java.sql.Connection
        Overrides:
        setSavepoint in class ConnectionJDBC2
        Throws:
        java.sql.SQLException
      • setSavepoint

        public java.sql.Savepoint setSavepoint​(java.lang.String name)
                                        throws java.sql.SQLException
        Specified by:
        setSavepoint in interface java.sql.Connection
        Overrides:
        setSavepoint in class ConnectionJDBC2
        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 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.