Package org.springframework.context.support

Examples of org.springframework.context.support.ClassPathXmlApplicationContext.stop()


        ClassPathXmlApplicationContext context
            = new ClassPathXmlApplicationContext(new String[] {"classpath:client-applicationContext.xml"});
        CustomerServiceTester client = (CustomerServiceTester)context.getBean("tester");
       
        client.testCustomerService();
        context.stop();
        context.destroy();
        //System.exit(0);
    }
}
View Full Code Here


    public static void main(String args[]) throws Exception {
        ClassPathXmlApplicationContext ctx
            = new ClassPathXmlApplicationContext("server-applicationContext.xml");
        System.in.read();
        ctx.stop();
        ctx.destroy();
    }
}
View Full Code Here

      Assert.assertNull(collab.fakeReporter);

    }
    finally {
      if (ctx != null) {
        ctx.stop();
        ctx.close();
      }
    }

    if (one != null) {
View Full Code Here

        remoteN1.dispose();
        GridImpl grid1 = (GridImpl) springContext.getBean("grid1");
        grid1.get(SocketService.class).close();
      
        springContext.registerShutdownHook();
        springContext.stop();
       
    }
   
    private SOAPMessage createMessageForKsession(String ksessionName) throws SOAPException{
       
View Full Code Here

        // we get the event bus from the application context
        EventBus eventBus = applicationContext.getBean(EventBus.class);
        eventBus.publish(asEventMessage(new ToDoItemCompletedEvent("todo1")));

        // we close the application context to make sure everything shuts down properly
        applicationContext.stop();
        applicationContext.close();
    }

    public static class ThreadPrintingEventListener {
View Full Code Here

                applicationContext.start();

            }

            public void stop() throws Exception {
                applicationContext.stop();
            }
        });

        return SpringCamelContext.springCamelContext(applicationContext);
    }
View Full Code Here

    AbstractApplicationContext springContext =
                new ClassPathXmlApplicationContext("META-INF/spring/spring-camel-context.xml");

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

  }

}
View Full Code Here

            try {
                AnnotationAction annotationAction = (AnnotationAction) consumerContext.getBean("annotationAction");
                String hello = annotationAction.doSayHello("world");
                assertEquals("annotation: hello, world", hello);
            } finally {
                consumerContext.stop();
                consumerContext.close();
            }
        } finally {
            providerContext.stop();
            providerContext.close();
View Full Code Here

                    Set<ConstraintViolation<?>> violations = ve.getConstraintViolations();
                    Assert.assertNotNull(violations);
                    Assert.assertEquals(2, violations.size());
                }
            } finally {
                consumerContext.stop();
                consumerContext.close();
            }
        } finally {
            providerContext.stop();
            providerContext.close();
View Full Code Here

            MockFilter filter = (MockFilter) ExtensionLoader.getExtensionLoader(Filter.class).getExtension("mymock");
            assertNotNull(filter.getMockDao());
            assertNotNull(filter.getProtocol());
            assertNotNull(filter.getLoadBalance());
        } finally {
            ctx.stop();
            ctx.close();
        }
    }

    @Test
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.