org.apache.cayenne.configuration.web
Class SessionContextRequestHandler
java.lang.Object
org.apache.cayenne.configuration.web.SessionContextRequestHandler
- All Implemented Interfaces:
- RequestHandler
public class SessionContextRequestHandler
- extends java.lang.Object
- implements RequestHandler
Default implementation of the RequestHandler
that stores per-user
ObjectContext
in a web session and binds it to request thread. Note that using
this handler would force HttpSession
creation, that may not be desirable in
many cases. Also session-bound context may result in a race condition with two user
requests updating the same persistent objects in parallel.
User applications in most cases should provide a custom RequestHandler that implements
a smarter app-specific strategy for providing ObjectContext.
- Since:
- 3.1
Method Summary |
void |
requestEnd(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
|
void |
requestStart(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SessionContextRequestHandler
public SessionContextRequestHandler()
requestStart
public void requestStart(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
- Specified by:
requestStart
in interface RequestHandler
requestEnd
public void requestEnd(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
- Specified by:
requestEnd
in interface RequestHandler
Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.