Class Transaction


  • public class Transaction
    extends java.lang.Object

    Transaction class.

    Version:
    $Id: $
    Author:
    ranger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.slf4j.Logger LOG  
    • Constructor Summary

      Constructors 
      Constructor Description
      Transaction()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void begin()
      begin
      static void end()
      end
      protected void finalize()
      finalize
      static java.sql.Connection getConnection​(java.lang.String dsName)
      getConnection
      static void register​(java.sql.ResultSet rs)
      register
      static void register​(java.sql.Statement stmt)
      register
      static void rollbackOnly()
      rollbackOnly
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG

        public static final org.slf4j.Logger LOG
    • Constructor Detail

      • Transaction

        public Transaction()
    • Method Detail

      • begin

        public static void begin()

        begin

      • getConnection

        public static java.sql.Connection getConnection​(java.lang.String dsName)
                                                 throws java.sql.SQLException

        getConnection

        Parameters:
        dsName - a String object.
        Returns:
        a Connection object.
        Throws:
        java.sql.SQLException - if any.
      • register

        public static void register​(java.sql.Statement stmt)

        register

        Parameters:
        stmt - a Statement object.
      • register

        public static void register​(java.sql.ResultSet rs)

        register

        Parameters:
        rs - a ResultSet object.
      • rollbackOnly

        public static void rollbackOnly()
                                 throws java.sql.SQLException

        rollbackOnly

        Throws:
        java.sql.SQLException - if any.
      • end

        public static void end()
                        throws java.sql.SQLException

        end

        Throws:
        java.sql.SQLException - if any.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable

        finalize

        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable