Package org.springframework.web.context.request

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


  /**
   * 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);
View Full Code Here


   * Register web-specific scopes with the given BeanFactory,
   * as used by the WebApplicationContext.
   * @param beanFactory the BeanFactory to configure
   */
  public static void registerWebApplicationScopes(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(ServletRequest.class, new ObjectFactory() {
      public Object getObject() {
View Full Code Here

  /**
   * Register request/session scopes, a {@link PortletContextAwareProcessor}, 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 PortletContextAwareProcessor(this.portletContext, this.portletConfig));
    beanFactory.ignoreDependencyInterface(PortletContextAware.class);
View Full Code Here

  /**
   * Register request/session scopes, a {@link PortletContextAwareProcessor}, 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));
    beanFactory.addBeanPostProcessor(new PortletContextAwareProcessor(this.portletContext, this.portletConfig));
View Full Code Here

  /**
   * 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

  /**
   * 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);
View Full Code Here

  /**
   * 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);
View Full Code Here

   * Register portlet-specific scopes with the given BeanFactory,
   * 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() {
View Full Code Here

*/
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);
    RequestContextHolder.setRequestAttributes(attributes);
View Full Code Here

    } else {
      flowContext = new GenericApplicationContext();
    }
    flowContext.setDisplayName("Flow ApplicationContext [" + getContext().getFlowId() + "]");
    flowContext.setParent(parent);
    flowContext.getBeanFactory().registerScope("request", new RequestScope());
    flowContext.getBeanFactory().registerScope("flash", new FlashScope());
    flowContext.getBeanFactory().registerScope("view", new ViewScope());
    flowContext.getBeanFactory().registerScope("flow", new FlowScope());
    flowContext.getBeanFactory().registerScope("conversation", new ConversationScope());
    Resource flowResource = flowModelHolder.getFlowModelResource();
View Full Code Here

TOP

Related Classes of org.springframework.web.context.request.RequestScope

Copyright © 2018 www.massapicom. 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.