Advertisement
Guest User

GarciaPL

a guest
Nov 22nd, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.98 KB | None | 0 0
  1.     private void run() {
  2.         logger.info("creating ctx...");
  3.         final AbstractApplicationContext ctx;
  4.         try {
  5.             ctx = new ClassPathXmlApplicationContext(
  6.                     "/garciapl-service-rmi-ctx.xml"
  7.             );
  8.             logger.info("ctx created; registering shutdown hook");
  9.             ctx.registerShutdownHook();
  10.  
  11.             logger.info("Starting up the application.  Stand by... ;)");
  12.  
  13.             logger.info("Creating MP service...");
  14.             ctx.getBean("userManagerRMI");
  15.  
  16.         } catch (Throwable e) {
  17.             logger.fatal("exception caught during initialization: ", e);
  18.             System.exit(-1);
  19.         }
  20.         logger.info("app is up and running");
  21.  
  22.         synchronized (this) {
  23.             try {
  24.                 wait();
  25.             } catch (InterruptedException e) {
  26.                 logger.error("wait interrupted", e);
  27.             }
  28.         }
  29.         logger.info("Exiting...");
  30.         System.exit(0);
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement