if (jsonObj.containsKey("sessionName")) {
sessionName = (String) jsonObj.get("sessionName");
}
// see if we have a session for this key already. If not create one.
SessionHandler handler =
this.sessionManager.getSessionHandlerByConfkey(confKey, cacheState);
if (handler == null) {
try {
handler =
this.sessionManager.createSession(confKey, cacheState);
handler.setSessionName(sessionName);
handler.setRequestUrl(requestUrl);
} catch (CowebException ce) {
ce.printStackTrace();
log.severe("Exception creating SessionHandler: " +
ce.getMessage());
resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
"Failed to create session.");
return;
}
}
String sessionId = handler.getSessionId();
// get our base url, to tell clients where the bayeux servlet is.
String base = this.getServletContext().getContextPath();
HashMap<String, Object> jsonResp = new HashMap<String, Object>();