Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.taglibs.standard.tag.common.sql
Class TransactionTagSupport

    java.lang.Object
      javax.servlet.jsp.tagext.TagSupport
          org.apache.taglibs.standard.tag.common.sql.TransactionTagSupport

All Implemented Interfaces:
  Serializable, IterationTag, JspTag, Tag, TryCatchFinally

Direct Known Subclasses:
  TransactionTag, TransactionTag

    public abstract class TransactionTagSupport

extends TagSupport
implements TryCatchFinally

Tag handler for <Transaction> in JSTL.

Author:
  Hans Bergsten
See Also:
  Serialized Form

Field Summary
`protected boolean` | `dataSourceSpecified`
`protected Object` | `rawDataSource`

Fields inherited from class javax.servlet.jsp.tagext.TagSupport
`id, pageContext`

Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
`EVAL_BODY_AGAIN`

Fields inherited from interface javax.servlet.jsp.tagext.Tag
`EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

Constructor Summary
`TransactionTagSupport()`

Method Summary
`void` | `doCatch(Throwable t)` Rollbacks the transaction and rethrows the Throwable.
`int` | `doEndTag()` Commits the transaction.
`void` | `doFinally()` Restores the `Connection` to its initial state and closes it.
`int` | `doStartTag()` Prepares for execution by setting the initial state, such as getting the `Connection` and preparing it for the transaction.
`Connection` | `getSharedConnection()` Called by nested parameter elements to get a reference to the Connection.
`void` | `release()` Release state.
`void` | `setIsolation(String iso)` Setter method for the transaction isolation level.

Methods inherited from class javax.servlet.jsp.tagext.TagSupport
`doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### rawDataSource

    protected Object rawDataSource

### dataSourceSpecified

    protected boolean dataSourceSpecified

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()`

### doEndTag

    public int doEndTag()
                 throws JspException

  Commits the transaction.

  Specified by:
    `doEndTag` in interface `Tag`
  Overrides:
    `doEndTag` in class `TagSupport`
  Returns:
    EVAL_PAGE
  Throws:
    `JspException` - if an error occurs while processing this tag
  See Also:
    `Tag.doEndTag()`

### doCatch

    public void doCatch(Throwable t)
                 throws Throwable

  Rollbacks the transaction and rethrows the Throwable.

  Specified by:
    `doCatch` in interface `TryCatchFinally`
  Parameters:
    `t` - The throwable exception navigating through this tag.
  Throws:
    `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`

### release

    public void release()

  Description copied from class: `TagSupport`
  Release state.

  Specified by:
    `release` in interface `Tag`
  Overrides:
    `release` in class `TagSupport`
  See Also:
    `Tag.release()`

### setIsolation

    public void setIsolation(String iso)
                      throws JspTagException

  Setter method for the transaction isolation level.

  Throws:
    `JspTagException`

### getSharedConnection

    public Connection getSharedConnection()

  Called by nested parameter elements to get a reference to the Connection.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.