Marks the bounds of a transaction within a JSP.

Class Name

atg.dtm.TransactionDroplet

Component

/atg/dynamo/transaction/droplet/Transaction

Required Input Parameters

None

Optional Input Parameters

transAttribute

Specifies how to handle the current transaction and whether to create a transaction. Its value must be one of the following:

Open Parameters

output

Executed in the transaction context defined by the transAttribute parameter; if an earlier transaction error occurs, the servlet bean does not execute this parameter.

errorOutput

Executed if a transaction error occurs before or after the output open parameter. Within the open parameter, the error is communicated through the following parameters:

successOutput

Executed after the output parameter if the commit or rollback operation completes successfully.

Usage Notes

TransactionDroplet can be used to enclose an area of a page within its own transaction context behavior. Several transactional behaviors are available—the same set that are available for Enterprise JavaBeans.

The open parameter output is rendered within the context of the specified transactional behavior. If a transaction error occurs before the servlet bean can execute the output parameter, then output is not rendered.

If any transaction error occurs, the errorOutput open parameter is rendered; otherwise the successOutput open parameter is rendered after execution of the output open parameter.

Example

The following example shows execution of a demarcated portion of a page in its own transaction, as specified by the requiresNew directive.

<dsp:droplet name="/atg/dynamo/transaction/droplet/Transaction">
  <dsp:param name="transAttribute" value="requiresNew"/>
  <dsp:oparam name="output">

  ... portion of page executed in demarcated area ...

  </dsp:oparam>
</dsp:droplet>

Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices