Triggers execution of all tasks encapsulated by the current transaction.

<dsp:commitTransaction var-spec>
   ...
</dsp:commitTransaction>

Attributes

var-spec

An EL variable or scripting variable that is defined with one of these attributes:

Attribute

Description

var

Names an EL variable. When you use var, you can set its scope attribute to page, request, session, or application. The default scope is page. For more information, see EL Variable Scopes in Chapter 2.

id

Names a scripting variable that scriptlets and expressions can access at runtime.

The variable has two properties:

Example

<dsp:commitTransaction var="CommitXA"/>
 <c:choose>
      <c:when test="${CommitXA.success}">
        The transaction committed successfully<br/>
      </c:when>
      <c:otherwise>
         Transaction failed for the following reason:<br/>
           <c:out value="${CommitXA.exception}"/>
      </c:otherwise>
   </c:choose>

The dsp:commitTransaction tag causes the transaction to commit. If the commit operation succeeds, the user sees the message The transaction committed successfully. If the transaction fails to commit, the user sees the message Transaction failed for the following reason: and the exception string.

 
loading table of contents...