Examples of initApplicationContext()


Examples of org.apache.webbeans.context.ContextFactory.initApplicationContext()

        defineManagedBean(ServiceImpl1.class);
        List<AbstractOwbBean<?>> comps = getComponents();

        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initRequestContext(null);
        contextFactory.initApplicationContext(null);

        Assert.assertEquals(2, comps.size());

        Object object = getManager().getInstance(comps.get(0));
View Full Code Here

Examples of org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping.initApplicationContext()

    annotationMapping.initApplicationContext();
    handlerMap.putAll(annotationMapping.getHandlerMap());

    BeanNameUrlHandlerMapping beanMapping = new BeanNameUrlHandlerMapping();
    beanMapping.setApplicationContext(applicationContext);
    beanMapping.initApplicationContext();
    handlerMap.putAll(beanMapping.getHandlerMap());

    this.urls = findUniqueUrls(handlerMap.keySet());
    this.defaultResources = findMethods(handlerMap, this.urls);
    this.jsonResources = new ArrayList<ResourceInfo>();
View Full Code Here

Examples of org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.initApplicationContext()

  @Test
  public void concreteUrlMappings() {
    SimpleUrlHandlerMapping mapping = new SimpleUrlHandlerMapping();
    mapping.setUrlMap(Collections.singletonMap("/foo", new Object()));
    mapping.setApplicationContext(new StaticApplicationContext());
    mapping.initApplicationContext();
    this.endpoint.setHandlerMappings(Collections
        .<AbstractUrlHandlerMapping> singletonList(mapping));
    Map<String, Object> result = this.endpoint.invoke();
    assertEquals(1, result.size());
    @SuppressWarnings("unchecked")
View Full Code Here

Examples of org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.initApplicationContext()

  public void beanUrlMappings() {
    StaticApplicationContext context = new StaticApplicationContext();
    SimpleUrlHandlerMapping mapping = new SimpleUrlHandlerMapping();
    mapping.setUrlMap(Collections.singletonMap("/foo", new Object()));
    mapping.setApplicationContext(context);
    mapping.initApplicationContext();
    context.getDefaultListableBeanFactory().registerSingleton("mapping", mapping);
    this.endpoint.setApplicationContext(context);
    Map<String, Object> result = this.endpoint.invoke();
    assertEquals(1, result.size());
    @SuppressWarnings("unchecked")
View Full Code Here

Examples of org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.initApplicationContext()

    controllerHandlerMapping.reload();

    // Update the resource handler mapping
    SimpleUrlHandlerMapping resourceHandlerMapping = resourceHandlerMapping();
    resourceHandlerMapping.setUrlMap( resourceHandlerRegistry.getUrlMap() );
    resourceHandlerMapping.initApplicationContext();

    // Handler exception resolver
    if ( exceptionResolvers.isEmpty() ) {
      addDefaultHandlerExceptionResolvers( exceptionResolvers, contentNegotiationManager, messageConverters );
    }
View Full Code Here

Examples of org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping.initApplicationContext()

  private void findResources() {
    Map<String, Object> handlerMap = new HashMap<String, Object>();

    DefaultAnnotationHandlerMapping annotationMapping = new DefaultAnnotationHandlerMapping();
    annotationMapping.setApplicationContext(applicationContext);
    annotationMapping.initApplicationContext();
    handlerMap.putAll(annotationMapping.getHandlerMap());

    BeanNameUrlHandlerMapping beanMapping = new BeanNameUrlHandlerMapping();
    beanMapping.setApplicationContext(applicationContext);
    beanMapping.initApplicationContext();
View Full Code Here

Examples of railo.runtime.PageContextImpl.initApplicationContext()

      initApplicationContext(pci,app);
       
     
      apps.put(pc.getApplicationContext().getName(), app);

      if(!pci.initApplicationContext(this)) return;
     
      if(rl!=null) {
        requestedPage=rl.execute(pc, requestedPage);
        if(requestedPage==null) return;
      }
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.