org.directwebremoting.guice
Class DwrScopes

java.lang.Object
  extended by org.directwebremoting.guice.DwrScopes

public class DwrScopes
extends java.lang.Object

Scopes available to DWR applications.

Author:
Tim Peierls [tim at peierls dot net]

Field Summary
static ContextScope<javax.servlet.ServletContext> APPLICATION
          Application scope: objects in this scope are eagerly initialized during DWR servlet initialization, and Closeable objects in this scope are closed during DWR servlet destruction.
static ContextScope<javax.servlet.ServletContext> GLOBAL
          Global application scope: like APPLICATION, but objects in this scope are not eagerly initialized and Closeable objects in this scope are closed during servlet context destruction (not during DWR servlet destruction).
static ContextScope<javax.servlet.http.HttpServletRequest> REQUEST
          HTTP request scope.
static ContextScope<ScriptSession> SCRIPT
          DWR script session scope.
static ContextScope<javax.servlet.http.HttpSession> SESSION
          HTTP session scope.
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUEST

public static final ContextScope<javax.servlet.http.HttpServletRequest> REQUEST
HTTP request scope.


SCRIPT

public static final ContextScope<ScriptSession> SCRIPT
DWR script session scope.


SESSION

public static final ContextScope<javax.servlet.http.HttpSession> SESSION
HTTP session scope. The implementation uses session identity to to track which sessions are open. Since the servlet spec doesn't guarantee identity of sessions between requests, don't rely on getOpenContexts() or close(session, handlers) to work correctly for this scope.


APPLICATION

public static final ContextScope<javax.servlet.ServletContext> APPLICATION
Application scope: objects in this scope are eagerly initialized during DWR servlet initialization, and Closeable objects in this scope are closed during DWR servlet destruction.


GLOBAL

public static final ContextScope<javax.servlet.ServletContext> GLOBAL
Global application scope: like APPLICATION, but objects in this scope are not eagerly initialized and Closeable objects in this scope are closed during servlet context destruction (not during DWR servlet destruction).


Copyright 2008