Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.configuration.web
Class SessionContextRequestHandler

    java.lang.Object
      org.apache.cayenne.configuration.web.SessionContextRequestHandler

All Implemented Interfaces:
  RequestHandler

    public class SessionContextRequestHandler

extends 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 periststent 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

Constructor Summary
`SessionContextRequestHandler()`

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`

Constructor Detail

### SessionContextRequestHandler

    public SessionContextRequestHandler()

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2010 Apache Cayenne. All Rights Reserved.