Class TransactionCleanupListener
- java.lang.Object
-
- com.google.apphosting.runtime.jetty9.TransactionCleanupListener
-
- All Implemented Interfaces:
RequestListener,EventListener
public class TransactionCleanupListener extends Object implements RequestListener
TransactionCleanupListenerlooks for datastore transactions that are still active when request processing is finished. The filter attempts to roll back any transactions that are found, and swallows any exceptions that are thrown while trying to perform roll backs. This ensures that any problems we encounter while trying to perform roll backs do not have any impact on the result returned the user.
-
-
Constructor Summary
Constructors Constructor Description TransactionCleanupListener(ClassLoader loader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrequestComplete(org.eclipse.jetty.webapp.WebAppContext context, org.eclipse.jetty.server.Request request)Called when a request exits the AppEngine context for the last time.voidrequestReceived(org.eclipse.jetty.webapp.WebAppContext context, org.eclipse.jetty.server.Request request)Called when a new request is received and first dispatched to the AppEngine context.
-
-
-
Constructor Detail
-
TransactionCleanupListener
public TransactionCleanupListener(ClassLoader loader)
-
-
Method Detail
-
requestReceived
public void requestReceived(org.eclipse.jetty.webapp.WebAppContext context, org.eclipse.jetty.server.Request request)Description copied from interface:RequestListenerCalled when a new request is received and first dispatched to the AppEngine context. It is only called once for any request, even if dispatched multiple times.- Specified by:
requestReceivedin interfaceRequestListener- Parameters:
context- The jetty context of the requestrequest- The jetty request object.
-
requestComplete
public void requestComplete(org.eclipse.jetty.webapp.WebAppContext context, org.eclipse.jetty.server.Request request)Description copied from interface:RequestListenerCalled when a request exits the AppEngine context for the last time. It is only called once for any request, even if dispatched multiple times.- Specified by:
requestCompletein interfaceRequestListener- Parameters:
context- The jetty context of the requestrequest- The jetty request object.
-
-