/** * The main method responsible for starting the coadunation base. * * @param args the command line arguments */ public static void main() { try { String logFile = System.getProperty("Log.File"); if (logFile.endsWith("properties")) { System.out.println("Initing the log file from properties."); PropertyConfigurator.configure(logFile); } else if (logFile.endsWith("xml")) { System.out.println("Initing the log file from xml."); DOMConfigurator.configure(logFile); } else { System.out.println("Using the basic configuration."); BasicConfigurator.configure(); } System.out.println("Start"); Runner runner = new Runner(); ShutdownHook shutdownHook = new ShutdownHook(); Runtime.getRuntime().addShutdownHook(shutdownHook); System.out.println("Core initialization complete"); System.out.println("Waiting for deployment to complete"); shutdownHook.monitor(); runner.shutdown(); shutdownHook.notifyOfCompletion(); log.info("Shut down complete"); } catch (Exception ex) { System.out.println("Failed to run the Coadunation base [" + ex.getMessage() + "]"); ex.printStackTrace(System.out); System.exit(-1); } }