Main.java

package org.flasby.util.spring;

public class Main { //implements Lifecycle {
//	
//	private final String contextFile;
//	private volatile ClassPathXmlApplicationContext context;
//	private final CountDownLatch latch = new CountDownLatch(1);
//	
//	public Main(String... args) throws Exception {
//		if ( args.length > 0 ) {
//			contextFile = args[0];
//		} else {
//			contextFile = "SpringContext.xml";
//		}
//	}
//
//	@Override
//	public void start() throws StartFailedException {
//		context = new ClassPathXmlApplicationContext( contextFile );
//	}
//	
//	public boolean isRunning() throws InterruptedException {
//		return context.isRunning();
//	}
//
//	public void blockUntilStopped() throws InterruptedException {
//		while ( context.isRunning() ) {
//			latch.await();
//		}
//	}
//	
//	@Override
//	public void stop() {
//		context.close();
//		latch.countDown();
//	}
}