Examples of containsBean()


Examples of org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.containsBean()

      synchronized (lock) {
        extenderConfiguration = context;
      }

      warScanner = context.containsBean(WAR_SCANNER_NAME) ? (WarScanner) context.getBean(WAR_SCANNER_NAME,
        WarScanner.class) : createDefaultWarScanner();

      warDeployer = context.containsBean(WAR_DEPLOYER_NAME) ? (WarDeployer) context.getBean(WAR_DEPLOYER_NAME,
        WarDeployer.class) : createDefaultWarDeployer(bundleContext);
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext.containsBean()

  protected Object getBean(String name) {
    WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
    if( applicationContext == null ) {
      throw new IllegalStateException("No Spring web application context found");
    }
    if( !applicationContext.containsBean(name) ) {
      {
        throw new IllegalArgumentException("Spring bean not found: " + name);
      }
    }
    return applicationContext.getBean(name);
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext.containsBean()

        FacesContext facesContext = FacesContext.getCurrentInstance();

        WebApplicationContext wac = getWebApplicationContext(facesContext);

        if (wac.containsBean(componentType)) {
            if (logger.isDebugEnabled()) {
                logger.debug("Successfully found component '" + componentType +
                    "' in root WebApplicationContext");
            }
View Full Code Here

Examples of org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.containsBean()

    ctx.refresh();

    assertHasEnvironment(ctx, prodWebEnv);
    assertEnvironmentBeanRegistered(ctx);
    assertEnvironmentAwareInvoked(ctx, prodWebEnv);
    assertThat(ctx.containsBean(DEV_BEAN_NAME), is(false));
    assertThat(ctx.containsBean(PROD_BEAN_NAME), is(true));
  }

  @Test
  public void staticApplicationContext() {
View Full Code Here

Examples of org.springframework.web.context.support.XmlWebApplicationContext.containsBean()

    ctx.refresh();

    assertHasEnvironment(ctx, prodWebEnv);
    assertEnvironmentBeanRegistered(ctx);
    assertEnvironmentAwareInvoked(ctx, prodWebEnv);
    assertThat(ctx.containsBean(DEV_BEAN_NAME), is(false));
    assertThat(ctx.containsBean(PROD_BEAN_NAME), is(true));
  }

  @Test
  public void staticApplicationContext() {
View Full Code Here

Examples of org.springframework.web.portlet.context.AbstractRefreshablePortletApplicationContext.containsBean()

    ctx.refresh();

    assertHasEnvironment(ctx, prodEnv);
    assertEnvironmentBeanRegistered(ctx);
    assertEnvironmentAwareInvoked(ctx, prodEnv);
    assertThat(ctx.containsBean(DEV_BEAN_NAME), is(false));
    assertThat(ctx.containsBean(PROD_BEAN_NAME), is(true));
  }

  @Test
  public void abstractApplicationContextValidatesRequiredPropertiesOnRefresh() {
View Full Code Here

Examples of org.springframework.web.portlet.context.XmlPortletApplicationContext.containsBean()

    ctx.refresh();

    assertHasEnvironment(ctx, prodEnv);
    assertEnvironmentBeanRegistered(ctx);
    assertEnvironmentAwareInvoked(ctx, prodEnv);
    assertThat(ctx.containsBean(DEV_BEAN_NAME), is(false));
    assertThat(ctx.containsBean(PROD_BEAN_NAME), is(true));
  }

  @Test
  public void abstractApplicationContextValidatesRequiredPropertiesOnRefresh() {
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.