Examples of SessionScope


Examples of org.springframework.web.context.request.SessionScope

   * Register ServletContextAwareProcessor.
   * @see ServletContextAwareProcessor
   */
  protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
    beanFactory.registerScope(SCOPE_REQUEST, new RequestScope());
    beanFactory.registerScope(SCOPE_SESSION, new SessionScope(false));
    beanFactory.registerScope(SCOPE_GLOBAL_SESSION, new SessionScope(true));

    beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext));
    beanFactory.ignoreDependencyInterface(ServletContextAware.class);
  }
View Full Code Here

Examples of org.springframework.web.context.request.SessionScope

  /**
   * Register request/session scopes, a {@link ServletContextAwareProcessor}, etc.
   */
  protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
    beanFactory.registerScope(SCOPE_REQUEST, new RequestScope());
    beanFactory.registerScope(SCOPE_SESSION, new SessionScope(false));
    beanFactory.registerScope(SCOPE_GLOBAL_SESSION, new SessionScope(true));

    beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext, this.servletConfig));
    beanFactory.ignoreDependencyInterface(ServletContextAware.class);
    beanFactory.ignoreDependencyInterface(ServletConfigAware.class);
  }
View Full Code Here

Examples of org.springframework.web.context.request.SessionScope

  /**
   * Register request/session scopes, a {@link ServletContextAwareProcessor}, etc.
   */
  protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
    beanFactory.registerScope(SCOPE_REQUEST, new RequestScope());
    beanFactory.registerScope(SCOPE_SESSION, new SessionScope(false));
    beanFactory.registerScope(SCOPE_GLOBAL_SESSION, new SessionScope(true));

    beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext, this.servletConfig));
    beanFactory.ignoreDependencyInterface(ServletContextAware.class);
    beanFactory.ignoreDependencyInterface(ServletConfigAware.class);
  }
View Full Code Here

Examples of org.springframework.web.context.request.SessionScope

   * as used by the Portlet ApplicationContext.
   * @param beanFactory the BeanFactory to configure
   */
  static void registerPortletApplicationScopes(ConfigurableListableBeanFactory beanFactory) {
    beanFactory.registerScope(WebApplicationContext.SCOPE_REQUEST, new RequestScope());
    beanFactory.registerScope(WebApplicationContext.SCOPE_SESSION, new SessionScope(false));
    beanFactory.registerScope(WebApplicationContext.SCOPE_GLOBAL_SESSION, new SessionScope(true));

    beanFactory.registerResolvableDependency(PortletRequest.class, new ObjectFactory() {
      public Object getObject() {
        RequestAttributes requestAttr = RequestContextHolder.currentRequestAttributes();
        if (!(requestAttr instanceof PortletRequestAttributes)) {
View Full Code Here

Examples of org.springframework.web.context.request.SessionScope

*
*/
public class BackendGenericXmlContextLoader extends GenericXmlContextLoader {
  @Override
  protected void customizeBeanFactory(DefaultListableBeanFactory factory) {
    factory.registerScope("session", new SessionScope());
    factory.registerScope("request", new RequestScope());

    final MockHttpServletRequest request = new MockHttpServletRequest();
    ServletRequestAttributes attributes;
    attributes = new ServletRequestAttributes(request);
View Full Code Here

Examples of org.springframework.web.context.request.SessionScope

   * @param beanFactory the BeanFactory to configure
   * @param sc the ServletContext that we're running within
   */
  public static void registerWebApplicationScopes(ConfigurableListableBeanFactory beanFactory, ServletContext sc) {
    beanFactory.registerScope(WebApplicationContext.SCOPE_REQUEST, new RequestScope());
    beanFactory.registerScope(WebApplicationContext.SCOPE_SESSION, new SessionScope(false));
    beanFactory.registerScope(WebApplicationContext.SCOPE_GLOBAL_SESSION, new SessionScope(true));
    if (sc != null) {
      ServletContextScope appScope = new ServletContextScope(sc);
      beanFactory.registerScope(WebApplicationContext.SCOPE_APPLICATION, appScope);
      // Register as ServletContext attribute, for ContextCleanupListener to detect it.
      sc.setAttribute(ServletContextScope.class.getName(), appScope);
View Full Code Here

Examples of org.springframework.web.context.request.SessionScope

   * @param bf the BeanFactory to configure
   * @param pc the PortletContext that we're running within
   */
  static void registerPortletApplicationScopes(ConfigurableListableBeanFactory bf, PortletContext pc) {
    bf.registerScope(WebApplicationContext.SCOPE_REQUEST, new RequestScope());
    bf.registerScope(WebApplicationContext.SCOPE_SESSION, new SessionScope(false));
    bf.registerScope(WebApplicationContext.SCOPE_GLOBAL_SESSION, new SessionScope(true));
    if (pc != null) {
      PortletContextScope appScope = new PortletContextScope(pc);
      bf.registerScope(WebApplicationContext.SCOPE_APPLICATION, appScope);
      // Register as PortletContext attribute, for ContextCleanupListener to detect it.
      pc.setAttribute(PortletContextScope.class.getName(), appScope);
View Full Code Here

Examples of org.springframework.web.context.request.SessionScope

   * @param beanFactory the BeanFactory to configure
   * @param sc the ServletContext that we're running within
   */
  public static void registerWebApplicationScopes(ConfigurableListableBeanFactory beanFactory, ServletContext sc) {
    beanFactory.registerScope(WebApplicationContext.SCOPE_REQUEST, new RequestScope());
    beanFactory.registerScope(WebApplicationContext.SCOPE_SESSION, new SessionScope(false));
    beanFactory.registerScope(WebApplicationContext.SCOPE_GLOBAL_SESSION, new SessionScope(true));
    if (sc != null) {
      ServletContextScope appScope = new ServletContextScope(sc);
      beanFactory.registerScope(WebApplicationContext.SCOPE_APPLICATION, appScope);
      // Register as ServletContext attribute, for ContextCleanupListener to detect it.
      sc.setAttribute(ServletContextScope.class.getName(), appScope);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.