atg.dtm
Class TransactionDroplet
java.lang.Object
   atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
       atg.nucleus.GenericService
atg.nucleus.GenericService
           atg.nucleus.TimedOperationService
atg.nucleus.TimedOperationService
               atg.nucleus.servlet.ServletService
atg.nucleus.servlet.ServletService
                   atg.nucleus.servlet.HttpServletService
atg.nucleus.servlet.HttpServletService
                       atg.servlet.DynamoServlet
atg.servlet.DynamoServlet
                           atg.droplet.ContextAffectingDropletImpl
atg.droplet.ContextAffectingDropletImpl
                               atg.dtm.TransactionDroplet
atg.dtm.TransactionDroplet
- All Implemented Interfaces: 
- atg.droplet.ContextAffectingDroplet, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet
- public class TransactionDroplet 
- extends atg.droplet.ContextAffectingDropletImpl
The TransactionDroplet is used in a page to enclose an area of a
 page within its own transaction context behavior.  Several
 transactional behaviors are available - the same set available for
 EJB's.  The "output" OPARAM is rendered within the context of the
 specified transactional behavior.  If any transaction-related error
 occurs, the "errorOutput" OPARAM is rendered after the "output"
 OPARAM is rendered, otherwise the "successOutput" is rendered after
 the "output" OPARAM is rendered.  If a transaction-related error
 occurs before the "output" OPARAM is rendered, then the "output"
 OPARAM will not be rendered but the "errorOutput" OPARAM will.
 
The TransactionDroplet takes the following parameters:
 
 - "transAttribute" - the value of this parameter describes how
 the current transaction should be handled and whether any new
 transaction should be created.  The default value is "requiresNew".
 Its value, if specified, must be one of the following:
 
 - "notSupported" - the current transaction, if any, is suspended,
 then resumed at the end of the droplet.  The "output" OPARAM is
 executed without any transaction context.
 
- "supports" - the current transaction, if any, is used.
 Otherwise, no transaction is used.  In other words, this is a noop.
 
- "required" - the current transaction, if any, is used.  If
 there is no current transaction, then one is created before calling
 the "output" OPARAM, then committed at the end of the droplet.
 
- "requiresNew" - the current transaction, if any, is suspended
 then resumed at the end of the droplet.  A new transaction is
 created before calling the "output" OPARAM, then committed at the
 end of the droplet.
 
- "mandatory" - if no transaction is in place then the "output"
 OPARAM is not executed and the "errorOutput" is executed instead
 with an error message.  If a transaction is in place, then this
 behaves the same as "supports".
 
- "never" - if a transaction is in place then the "output" OPARAM
 is not executed and the "errorOutput" is executed instead with an
 error message.  If no transaction is in place, then this behaves
 the same as "supports".
 
 
- "output" - this is the OPARAM that will be executed in the
 transaction context defined by the "transAttribute" parameter.
 
- "errorOutput" - this is an optional OPARAM that will be executed if a
 transaction-related error occurs either before or after the "output"
 OPARAM (after only supported when invoked from a JHTML page).  Within the
 OPARAM, the error will be communicated through the following parameters:
 
   - "errorMessage" - a text message indicating the error
   
- "errorStackTrace" - the full stack trace of the error
 
 
- "successOutput" - this is an optional OPARAM that will be
 executed if the commit or rollback operation completes
 successfully. This OPARAM will not be rendered when the
 TransactionDroplet is invoked from a non-JHTML page (JSP, for example).
 
 
| Nested classes/interfaces inherited from class atg.droplet.ContextAffectingDropletImpl | 
| atg.droplet.ContextAffectingDropletImpl.TestContextAffectingDroplet | 
 
 
 
 
 
| Fields inherited from interface atg.droplet.ContextAffectingDroplet | 
| ATTRIBUTE_BEFORE_CONTENT_RESULT | 
 
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging | 
| DEFAULT_LOG_TRACE_STATUS | 
 
 
 
 
| Methods inherited from class atg.droplet.ContextAffectingDropletImpl | 
| service | 
 
| Methods inherited from class atg.servlet.DynamoServlet | 
| doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameter | 
 
 
 
| Methods inherited from class atg.nucleus.GenericService | 
| addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService | 
 
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl | 
| vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
| Methods inherited from interface javax.servlet.Servlet | 
| destroy, getServletConfig, getServletInfo, init, service | 
 
CLASS_VERSION
public static java.lang.String CLASS_VERSION
TRANS_ATTRIBUTE_UNKNOWN
public static final int TRANS_ATTRIBUTE_UNKNOWN
- See Also:
- Constant Field Values
TRANS_ATTRIBUTE_NOT_SUPPORTED
public static final int TRANS_ATTRIBUTE_NOT_SUPPORTED
- See Also:
- Constant Field Values
TRANS_ATTRIBUTE_SUPPORTS
public static final int TRANS_ATTRIBUTE_SUPPORTS
- See Also:
- Constant Field Values
TRANS_ATTRIBUTE_REQUIRED
public static final int TRANS_ATTRIBUTE_REQUIRED
- See Also:
- Constant Field Values
TRANS_ATTRIBUTE_REQUIRES_NEW
public static final int TRANS_ATTRIBUTE_REQUIRES_NEW
- See Also:
- Constant Field Values
TRANS_ATTRIBUTE_MANDATORY
public static final int TRANS_ATTRIBUTE_MANDATORY
- See Also:
- Constant Field Values
TRANS_ATTRIBUTE_NEVER
public static final int TRANS_ATTRIBUTE_NEVER
- See Also:
- Constant Field Values
TransactionDroplet
public TransactionDroplet()
- Constructor
 
getTransactionManager
public javax.transaction.TransactionManager getTransactionManager()
- 
 
setTransactionManager
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
- 
 
beforeContent
public java.lang.Object beforeContent(DynamoHttpServletRequest pRequest,
                                      DynamoHttpServletResponse pResponse)
                               throws javax.servlet.ServletException
- 
 
- 
- Specified by:
- beforeContentin interface- atg.droplet.ContextAffectingDroplet
- Specified by:
- beforeContentin class- atg.droplet.ContextAffectingDropletImpl
 
- 
- Throws:
- javax.servlet.ServletException
 
afterContent
public void afterContent(DynamoHttpServletRequest pRequest,
                         DynamoHttpServletResponse pResponse,
                         java.lang.Object pBeforeContentResult)
                  throws javax.servlet.ServletException
- For backwards compatability with the method signature of afterContent.
 
- 
- Throws:
- javax.servlet.ServletException
 
afterContent
public void afterContent(DynamoHttpServletRequest pRequest,
                         DynamoHttpServletResponse pResponse,
                         java.lang.Object pBeforeContentResult,
                         boolean pThrewException)
                  throws javax.servlet.ServletException
- 
 
- 
- Specified by:
- afterContentin interface- atg.droplet.ContextAffectingDroplet
- Specified by:
- afterContentin class- atg.droplet.ContextAffectingDropletImpl
 
- 
- Throws:
- javax.servlet.ServletException
 
doService
public void doService(DynamoHttpServletRequest pRequest,
                      DynamoHttpServletResponse pResponse,
                      java.lang.Object pBeforeContentResult)
               throws javax.servlet.ServletException,
                      java.io.IOException
- Do all the non setup/teardown work here. All rendering
 of OPARAMs should happen here.
 
- 
- Specified by:
- doServicein class- atg.droplet.ContextAffectingDropletImpl
 
- 
- Parameters:
- pRequest- the request
- pResponse- the response
- pBeforeContentResult- the result returned from beforeContent()
- Throws:
- javax.servlet.ServletException- if an error occurs
- java.io.IOException- if an error occurs