Examples of registerShutdownHook()


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

          + "\n=========================================================" );

    final AbstractApplicationContext context =
        new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/*-context.xml");

    context.registerShutdownHook();

    final Scanner scanner = new Scanner(System.in);


    final PersonService personService = context.getBean(PersonService.class);
View Full Code Here

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

    @SuppressWarnings("resource")
    final AbstractApplicationContext context =
        new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/spring-integration-confirms-context.xml");

    context.registerShutdownHook();

    LOGGER.info("\n========================================================="
          + "\n                                                          "
          + "\n    This is the AMQP Sample with confirms/returns -       "
          + "\n                                                          "
View Full Code Here

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

    @SuppressWarnings("resource")
    final AbstractApplicationContext context =
        new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/spring-integration-context.xml");

    context.registerShutdownHook();

    LOGGER.info("\n========================================================="
          + "\n                                                          "
          + "\n    This is the AMQP Sample -                             "
          + "\n                                                          "
View Full Code Here

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

          + "\n=========================================================" );

    final AbstractApplicationContext context =
        new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/stateless-retry-advice-context.xml");

    context.registerShutdownHook();

    LOGGER.info("\n========================================================="
          + "\n                                                          "
          + "\n    This is the Stateless Sample -                        "
          + "\n                                                          "
View Full Code Here

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

          + "\n=========================================================" );

    final AbstractApplicationContext context =
        new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/circuit-breaker-advice-context.xml");

    context.registerShutdownHook();

    LOGGER.info("\n========================================================="
          + "\n                                                          "
          + "\n    This is the Circuit Breaker Sample -                  "
          + "\n                                                          "
View Full Code Here

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

          + "\n=========================================================" );

    final AbstractApplicationContext context =
        new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/stateful-retry-advice-context.xml");

    context.registerShutdownHook();

    LOGGER.info("\n========================================================="
          + "\n                                                          "
          + "\n    This is the Stateful Sample -                        "
          + "\n                                                          "
View Full Code Here

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

          + "\n=========================================================" );

    final AbstractApplicationContext context =
        new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/expression-advice-context.xml");

    context.registerShutdownHook();

    @SuppressWarnings("unchecked")
    SessionFactory<FTPFile> sessionFactory = context.getBean(SessionFactory.class);
    SourcePollingChannelAdapter fileInbound = context.getBean(SourcePollingChannelAdapter.class);
View Full Code Here

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

          + "\n=========================================================" );

    final AbstractApplicationContext context =
        new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/expression-advice-context.xml");

    context.registerShutdownHook();

    @SuppressWarnings("unchecked")
    SessionFactory<FTPFile> sessionFactory = context.getBean(SessionFactory.class);
    SourcePollingChannelAdapter fileInbound = context.getBean(SourcePollingChannelAdapter.class);
View Full Code Here

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

    @Test
    public void javadocExample() {
        String resName = "/" + getClass().getName().replace('.', '/') + ".xml";
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(resName);
        context.registerShutdownHook();
        try {
            provider = context.getBean(DefaultJaasAuthenticationProvider.class);
            Authentication auth = provider.authenticate(token);
            assertEquals(true, auth.isAuthenticated());
            assertEquals(token.getPrincipal(), auth.getPrincipal());
View Full Code Here

Examples of org.springframework.context.support.FileSystemXmlApplicationContext.registerShutdownHook()

            context.setConfigLocation(tempFile.getAbsolutePath());
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        context.refresh();
        context.registerShutdownHook();
        return null;//kieSpringApplicationListener.getKieModuleModel();
    }

}
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.