+ public synchronized boolean isRunning() {
+ return running;
+ }
+
+ public synchronized void setRunning(boolean running) {
+ this.running = running;
+ }
+
+ public void onApplicationEvent(ApplicationEvent event) {
+ if (event instanceof ExecutionFinishedEvent) {
+ ExecutionContext executionContext = ((ExecutionFinishedEvent) event)
+ .getExecutionContext();
+ log.debug("Execution " + executionContext.getUuid()
+ + " finished, stopping launcher...");
+ synchronized (this) {
+ running = false;
+ notifyAll();
+ }
+ }
+
+ }
+
+ public static void main(String[] args) {
+ String script = "file:src/slc/conf/main.xml";
+ new EfLauncher().launch(script);
+
+ // ExecutionFlow main = (ExecutionFlow)context.getBean("main");
+ // main.execute();
+ /*
+ * Map<String, ExecutionFlow> eFlows = context
+ * .getBeansOfType(ExecutionFlow.class); for (String name :
+ * eFlows.keySet()) { log.info("##\n## Execute ExecutionFlow " + name);
+ * ExecutionFlow eFlow = eFlows.get(name); eFlow.execute();
+ *
+ * }
+ */
+ }
+
+ private static void describe(String script) {
+ SimpleBeanDefinitionRegistry registry = new SimpleBeanDefinitionRegistry();
+ XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(registry);
+ reader.loadBeanDefinitions(script);
+ new ConsoleContextDescriber().describeContext(registry);
+ }