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);