Package com.foreach.across.core.context

Examples of com.foreach.across.core.context.AcrossApplicationContextHolder


    when( beanRegistry.getBeanOfType( AcrossInstallerRepository.class ) ).thenReturn( installerRepository );

    AbstractApplicationContext applicationContext = mock( AbstractApplicationContext.class );
    when( applicationContext.getBean( AcrossContextBeanRegistry.class ) ).thenReturn( beanRegistry );

    AcrossApplicationContextHolder acrossApplicationContextHolder = mock( AcrossApplicationContextHolder.class );
    when( acrossApplicationContextHolder.getApplicationContext() ).thenReturn( applicationContext );
    when( acrossApplicationContextHolder.getBeanFactory() ).thenReturn( beanFactory );

    AcrossContext acrossContext = mock( AcrossContext.class );
    when( acrossContext.hasApplicationContext() ).thenReturn( true );
    when( acrossContext.getAcrossApplicationContextHolder() ).thenReturn( acrossApplicationContextHolder );
View Full Code Here


    installers( AlwaysRunBeforeContextBootstrapInstaller.class );
    when( contextSettings.shouldRun( anyString(), anyObject() ) ).thenReturn( InstallerAction.EXECUTE );

    AcrossListableBeanFactory moduleBeanFactory = mock( AcrossListableBeanFactory.class );

    AcrossApplicationContextHolder moduleAcrossApplicationContextHolder = mock(
        AcrossApplicationContextHolder.class );
    when( moduleAcrossApplicationContextHolder.getBeanFactory() ).thenReturn( moduleBeanFactory );

    when( module.hasApplicationContext() ).thenReturn( true );
    when( module.getAcrossApplicationContextHolder() ).thenReturn( moduleAcrossApplicationContextHolder );

    registry.runInstallersForModule( "", InstallerPhase.BeforeContextBootstrap );
View Full Code Here

  private boolean areDependenciesMet( Class<?> installerClass ) {
    return AcrossDependsCondition.applies( contextConfig, installerClass );
  }

  private ConfigurableListableBeanFactory getBeanFactoryForInstallerWiring( AcrossModule module ) {
    AcrossApplicationContextHolder moduleContext =
        AcrossContextUtils.getAcrossApplicationContextHolder( module );

    if ( moduleContext == null ) {
      // If module context not yet available, use the root context
      return AcrossContextUtils.getBeanFactory( contextConfig.getContext() );
    }
    else {
      return moduleContext.getBeanFactory();
    }
  }
View Full Code Here

TOP

Related Classes of com.foreach.across.core.context.AcrossApplicationContextHolder

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.