atg.dtm
Class TransactionDroplet
java.lang.Object
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.nucleus.TimedOperationService
atg.nucleus.servlet.ServletService
atg.nucleus.servlet.HttpServletService
atg.servlet.DynamoServlet
atg.dtm.TransactionDroplet
- All Implemented Interfaces:
- NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet
public class TransactionDroplet
- extends DynamoServlet
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. 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.
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
DEFAULT_LOG_TRACE_STATUS |
Methods inherited from class atg.nucleus.GenericService |
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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 |
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)
service
public void service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
- Service method
- Overrides:
service
in class DynamoServlet
- Parameters:
pRequest
- the request to be processedpResponse
- the response object for this request
- Throws:
javax.servlet.ServletException
- an application specific error occurred
processing this request
java.io.IOException
- an error occurred reading data from the request
or writing data to the response.