Package org.springframework.context.support

Examples of org.springframework.context.support.AbstractApplicationContext.start()


    Assert.assertNull(BpmPlatform.getDefaultProcessEngine());
    Assert.assertEquals(0, BpmPlatform.getProcessEngineService().getProcessEngines().size());
   
    // start spring application context
    AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/camunda/bpm/engine/spring/test/container/ManagedProcessEngineFactoryBean-context.xml");
    applicationContext.start();
   
    // assert that now the process engine is registered:
    Assert.assertNotNull(BpmPlatform.getDefaultProcessEngine());     
   
    // close the spring application context
View Full Code Here


    // initially no applications are deployed:
    Assert.assertEquals(0, BpmPlatform.getProcessApplicationService().getProcessApplicationNames().size());

    // start a spring application context
    AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/camunda/bpm/engine/spring/test/application/SpringProcessApplicationDeploymentTest-context.xml");
    applicationContext.start();

    // assert that there is a process application deployed with the name of the process application bean
    Assert.assertNotNull(BpmPlatform.getProcessApplicationService()
      .getProcessApplicationInfo("myProcessApplication"));
View Full Code Here

  @Test
  public void testDeployProcessArchive() {

    // start a spring application context
    AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/camunda/bpm/engine/spring/test/application/SpringProcessArchiveDeploymentTest-context.xml");
    applicationContext.start();

    // assert the process archive is deployed:
    ProcessEngine processEngine = BpmPlatform.getDefaultProcessEngine();
    Assert.assertNotNull(processEngine.getRepositoryService().createDeploymentQuery().deploymentName("pa").singleResult());
View Full Code Here

  @Test
  public void testPostDeployRegistrationPa() {
    // this test verifies that a process application is able to register a deployment from the @PostDeploy callback:

    AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/camunda/bpm/engine/spring/test/application/PostDeployRegistrationPaTest-context.xml");
    applicationContext.start();

    ProcessEngine processEngine = BpmPlatform.getDefaultProcessEngine();

    // create a manual deployment:
    Deployment deployment = processEngine.getRepositoryService()
View Full Code Here

    public void testAppContextStart() {
        AbstractApplicationContext appContext = EasyMock.createMock(AbstractApplicationContext.class);
        appContext.refresh();
        appContext.setParent(EasyMock.isA(ApplicationContext.class));
        appContext.start();
        replay(appContext);
        SpringCompositeComponent component = new SpringCompositeComponent("spring", appContext, null, null, null);
        component.start();
        verify(appContext);
    }
View Full Code Here

 
  public static void main(String[] args) throws InterruptedException {
    AbstractApplicationContext springContext =
                new ClassPathXmlApplicationContext("META-INF/spring/spring-camel-context.xml");

        springContext.start();
        Thread.sleep(10000);
        springContext.stop();

  }
View Full Code Here

    AbstractApplicationContext appContext = null;


    try {
      appContext = getApplicationContext();
      appContext.start();

      ViewProcessor viewProcessor = appContext.getBean("viewProcessor", ViewProcessor.class);

      ViewClient viewClient = viewProcessor.createViewClient(UserPrincipal.getLocalUser());
      MarketDataSpecification marketDataSpec = new FixedHistoricalMarketDataSpecification(s_observationDateTime.toLocalDate());
View Full Code Here

    // Make sure the parent can handle exposed beans - if not, introduce a supporting BeanFactory in the hierarchy
    if ( !( beanFactory instanceof AcrossListableBeanFactory ) ) {
      AbstractApplicationContext parentApplicationContext = applicationContextFactory.createApplicationContext();
      parentApplicationContext.refresh();
      parentApplicationContext.start();

      ConfigurableListableBeanFactory parentBeanFactory = parentApplicationContext.getBeanFactory();

      parentBeanFactory.setParentBeanFactory( currentBeanFactory.getParentBeanFactory() );
      parentApplicationContext.setParent( currentApplicationContext.getParent() );
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.