Class TransactionTagSupport

    • Constructor Detail

      • TransactionTagSupport

        public TransactionTagSupport()
    • Method Detail

      • doStartTag

        public int doStartTag()
                       throws JspException
        Prepares for execution by setting the initial state, such as getting the Connection and preparing it for the transaction.
        Specified by:
        doStartTag in interface Tag
        Overrides:
        doStartTag in class TagSupport
        Returns:
        SKIP_BODY
        Throws:
        JspException - if an error occurs while processing this tag
        See Also:
        Tag.doStartTag()
      • doCatch

        public void doCatch​(java.lang.Throwable t)
                     throws java.lang.Throwable
        Rollbacks the transaction and rethrows the Throwable.
        Specified by:
        doCatch in interface TryCatchFinally
        Parameters:
        t - The throwable exception navigating through this tag.
        Throws:
        java.lang.Throwable - if the exception is to be rethrown further up the nest chain.
      • doFinally

        public void doFinally()
        Restores the Connection to its initial state and closes it.
        Specified by:
        doFinally in interface TryCatchFinally
      • setIsolation

        public void setIsolation​(java.lang.String iso)
                          throws JspTagException
        Setter method for the transaction isolation level.
        Throws:
        JspTagException
      • getSharedConnection

        public java.sql.Connection getSharedConnection()
        Called by nested parameter elements to get a reference to the Connection.