Created
August 18, 2012 05:05
-
-
Save kontinuity/3384581 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package core; | |
import org.apache.log4j.Logger; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.support.ClassPathXmlApplicationContext; | |
import java.io.IOException; | |
public class BootStrapper { | |
public static void main(String[] args) throws IOException, | |
InterruptedException { | |
Logger.getLogger(BootStrapper.class).info("Starting history listener..."); | |
try { | |
StreamManager streamManager = getStreamManager(); | |
streamManager.init(); | |
} catch (Exception e) { | |
Logger.getLogger(BootStrapper.class).error("Failed to initialize history listener", e); | |
} | |
} | |
private static StreamManager getStreamManager() { | |
ApplicationContext context = new ClassPathXmlApplicationContext( | |
"applicationContext.xml"); | |
StreamManager streamManager = (StreamManager) context | |
.getBean("streamManager"); | |
return streamManager; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment