public void serverStarted(DarkstarRunner runner, ServerSessionManager mgr) {
// When a darkstar server starts up, open a connection to it, and
// start a specific connection that sends messages when the configuration
// of xapps has changed.
try {
WonderlandSession session = mgr.createSession();
context.setAttribute(SESSION_ATTR, session);
XAppsWebConfigConnection conn = new XAppsWebConfigConnection();
session.connect(conn);
context.setAttribute(XAPPS_CONN_ATTR, conn);
} catch (ConnectionFailureException ex) {
logger.log(Level.SEVERE, "Connection failed", ex);
} catch (LoginFailureException ex) {
logger.log(Level.WARNING, "Login failed", ex);