Class TransactionTagSupport
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.apache.taglibs.standard.tag.common.sql.TransactionTagSupport
- All Implemented Interfaces:
IterationTag,JspTag,Tag,TryCatchFinally,Serializable
- Direct Known Subclasses:
TransactionTag,TransactionTag
Tag handler for <Transaction> in JSTL.
- Author:
- Hans Bergsten
- See Also:
-
Field Summary
FieldsFields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRollbacks the transaction and rethrows the Throwable.intdoEndTag()Commits the transaction.voidRestores theConnectionto its initial state and closes it.intPrepares for execution by setting the initial state, such as getting theConnectionand preparing it for the transaction.Called by nested parameter elements to get a reference to the Connection.voidrelease()Release state.voidsetIsolation(String iso) Setter method for the transaction isolation level.Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Field Details
-
rawDataSource
-
dataSourceSpecified
protected boolean dataSourceSpecified
-
-
Constructor Details
-
TransactionTagSupport
public TransactionTagSupport()
-
-
Method Details
-
doStartTag
Prepares for execution by setting the initial state, such as getting theConnectionand preparing it for the transaction.- Specified by:
doStartTagin interfaceTag- Overrides:
doStartTagin classTagSupport- Returns:
- SKIP_BODY
- Throws:
JspException- if an error occurs while processing this tag- See Also:
-
doEndTag
Commits the transaction.- Specified by:
doEndTagin interfaceTag- Overrides:
doEndTagin classTagSupport- Returns:
- EVAL_PAGE
- Throws:
JspException- if an error occurs while processing this tag- See Also:
-
doCatch
Rollbacks the transaction and rethrows the Throwable.- Specified by:
doCatchin interfaceTryCatchFinally- 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 theConnectionto its initial state and closes it.- Specified by:
doFinallyin interfaceTryCatchFinally
-
release
public void release()Description copied from class:TagSupportRelease state.- Specified by:
releasein interfaceTag- Overrides:
releasein classTagSupport- See Also:
-
setIsolation
Setter method for the transaction isolation level.- Throws:
JspTagException
-