Examples of registerShutdownHook()


Examples of com.alibaba.citrus.service.resource.support.context.ResourceLoadingXmlApplicationContext.registerShutdownHook()

        ResourceLoadingXmlApplicationContext context = new ResourceLoadingXmlApplicationContext(locations,
                                                                                                testResourceLoader, false);

        prepareContext(context);
        context.refresh();
        context.registerShutdownHook();

        return context;
    }

    protected void prepareContext(AbstractXmlApplicationContext context) {
View Full Code Here

Examples of com.linkedin.databus2.relay.DatabusRelayMain.registerShutdownHook()

     // Create and initialize the server instance
     DatabusRelayMain serverContainer = new DatabusRelayMain(staticConfig, pStaticConfigs);

     serverContainer.initProducers();
     serverContainer.registerShutdownHook();
     serverContainer.startAndBlock();
  }

}
View Full Code Here

Examples of org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.registerShutdownHook()

    }

    public void start() throws Exception {
        CloudStackSpringContext context = new CloudStackSpringContext();
        context.registerShutdownHook();

        if (Boolean.getBoolean("force.exit")) {
            System.exit(0);
        }
    }
View Full Code Here

Examples of org.springframework.context.ConfigurableApplicationContext.registerShutdownHook()

    }
    String keyString = contextKeyString(key);
    ConfigurableApplicationContext ctx = contextKeyToContextMap.get(keyString);
    if (ctx == null) {
      ctx = loadContext(key);
      ctx.registerShutdownHook();
      contextKeyToContextMap.put(keyString, ctx);
    }
    return ctx;
  }
View Full Code Here

Examples of org.springframework.context.annotation.AnnotationConfigApplicationContext.registerShutdownHook()

        ctx.scan(p.getName());
      }
    }

    ctx.refresh();
    ctx.registerShutdownHook();
    return ctx;
  }

  private void generateSchema(final OutputStream os) {
    try {
View Full Code Here

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

                  + LINE );

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

        context.registerShutdownHook();

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

        final CoffeeService service = context.getBean(CoffeeService.class);

View Full Code Here

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

          + LINE_SEPARATOR );

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

    context.registerShutdownHook();

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

    final UserService service = context.getBean(UserService.class);

View Full Code Here

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

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

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

    context.registerShutdownHook();

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

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

        + LINE );

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

    context.registerShutdownHook();

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

    final CoffeeService service = context.getBean(CoffeeService.class);

View Full Code Here

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

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

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

    context.registerShutdownHook();

    final SearchRequestor searchRequestor = context.getBean(SearchRequestor.class);
    final SearchA searchA = context.getBean(SearchA.class);
    final SearchB searchB = context.getBean(SearchB.class);

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.