SessionRequestHandler.java revision d79b3a1008170c69ef720163254b78c998d55ee0
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The contents of this file are subject to the terms
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * of the Common Development and Distribution License
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * (the License). You may not use this file except in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * You can obtain a copy of the License at
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * See the License for the specific language governing
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * permission and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * When distributing Covered Code, include this CDDL
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Header Notice in each file and include the License file
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * If applicable, add the following below the CDDL Header,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * with the fields enclosed by brackets [] replaced by
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * your own identifying information:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * $Id: SessionRequestHandler.java,v 1.9 2009/04/02 04:11:44 ericow Exp $
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott * Portions Copyrighted 2011-2015 ForgeRock AS
1d407e39b7d8f68d9a2b1e178f35fab037d9835aRobert Wapshottimport static org.forgerock.openam.audit.AuditConstants.Component.*;
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshottimport static org.forgerock.openam.session.SessionConstants.*;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.iplanet.dpro.session.SessionException;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.iplanet.dpro.session.share.SessionBundle;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.iplanet.dpro.session.share.SessionInfo;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.iplanet.dpro.session.share.SessionRequest;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.iplanet.dpro.session.share.SessionResponse;
1d407e39b7d8f68d9a2b1e178f35fab037d9835aRobert Wapshottimport com.iplanet.services.comm.server.PLLAuditor;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.iplanet.services.comm.server.RequestHandler;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.iplanet.services.comm.share.Response;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.iplanet.services.comm.share.ResponseSet;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.sun.identity.session.util.RestrictedTokenAction;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.sun.identity.session.util.RestrictedTokenContext;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.sun.identity.session.util.SessionUtils;
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshottimport org.forgerock.guice.core.InjectorHolder;
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshottimport org.forgerock.openam.session.SessionCache;
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshottimport org.forgerock.openam.session.SessionCookies;
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshottimport org.forgerock.openam.session.SessionPLLSender;
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshottimport org.forgerock.openam.session.SessionServiceURLService;
1d407e39b7d8f68d9a2b1e178f35fab037d9835aRobert Wapshottimport javax.servlet.http.HttpServletRequest;
1d407e39b7d8f68d9a2b1e178f35fab037d9835aRobert Wapshottimport javax.servlet.http.HttpServletResponse;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterpublic class SessionRequestHandler implements RequestHandler {
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott private final SessionService sessionService;
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott private final SessionServerConfig serverConfig;
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott private final SessionServiceConfig serviceConfig;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Added this property to block registration of the global notification
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * listener (AddListenerOnAllSessions);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster private static Boolean enableAddListenerOnAllSessions = null;
7ea769c9edcf1a585b7e3b0b532f790efed64b21David Luna private static final SessionServiceURLService SESSION_SERVICE_URL_SERVICE = InjectorHolder.getInstance(SessionServiceURLService.class);
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott private static final SessionCookies sessionCookies
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott = InjectorHolder.getInstance(SessionCookies.class);
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott private static final SessionCache sessionCache = InjectorHolder.getInstance(SessionCache.class);
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott private static final SessionPLLSender sessionPLLSender = InjectorHolder.getInstance(SessionPLLSender.class);
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott sessionService = InjectorHolder.getInstance(SessionService.class);
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott sessionDebug = InjectorHolder.getInstance(Key.get(Debug.class, Names.named(SESSION_DEBUG)));
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott serverConfig = InjectorHolder.getInstance(SessionServerConfig.class);
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott serviceConfig = InjectorHolder.getInstance(SessionServiceConfig.class);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell public ResponseSet process(PLLAuditor auditor,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster ResponseSet rset = new ResponseSet(SessionService.SESSION_SERVICE);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell Response res = processRequest(auditor, req, servletRequest, servletResponse);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell final HttpServletResponse servletResponse) {
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell final SessionRequest sreq = SessionRequest.parseXML(req.getContent());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster SessionResponse sres = new SessionResponse(sreq.getRequestID(), sreq.getMethodID());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // use remote client IP as default RestrictedToken context
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell context = SessionUtils.getClientAddress(servletRequest);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell sessionDebug.error("SessionRequestHandler encounterd exception", ex);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell return auditedExceptionResponse(auditor, sres);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell context = RestrictedTokenContext.unmarshal(requester);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell SSOTokenManager ssoTokenManager = SSOTokenManager.getInstance();
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (!ssoTokenManager.isValidToken(adminToken)) {
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell sres.setException(SessionBundle.getString("appTokenInvalid") + requester);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell return auditedExceptionResponse(auditor, sres);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell "SessionRequestHandler.processRequest:"
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell + "app token invalid, sending Session response"
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell +" with Exception");
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell sres.setException(SessionBundle.getString("appTokenInvalid") + requester);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell return auditedExceptionResponse(auditor, sres);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster sres = (SessionResponse) RestrictedTokenContext.doUsing(context,
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell return processSessionRequest(auditor, sreq, servletRequest, servletResponse);
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott sessionDebug.error("SessionRequestHandler encounterd exception", ex);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell auditor.auditAccessFailure(sres.getException());
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell private Response auditedExceptionResponse(PLLAuditor auditor, SessionResponse sres) {
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell auditor.auditAccessFailure(sres.getException());
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell private SessionResponse processSessionRequest(PLLAuditor auditor,
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell SessionResponse res = new SessionResponse(req.getRequestID(), req.getMethodID());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster SessionID sid = new SessionID(req.getSessionID());
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell * Always lookup the Session so that we can extract audit information from it. If sid belongs to a remote
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell * session, then looking up the session may require further inter-server communication.
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell * Note, this also acts as a filter since we must have a valid session identifier in order to proceed.
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell requesterSession = sessionCache.getSession(sid);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell auditor.setAuthenticationId(requesterSession.getClientID());
d79b3a1008170c69ef720163254b78c998d55ee0Craig McDonnell auditor.setTrackingId(requesterSession.getProperty(Constants.AM_CTX_ID));
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /* common processing by groups of methods */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * in this group of methods the request is targeting either all
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * LOCAL sessions or a single local session identified by another
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * request parameter sid in this case is only used to authenticate
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * the operation Session pointed by sid is not expected to be local
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * to this server (although it might)
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell case SessionRequest.AddSessionListenerOnAllSessions:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * also check that sid is not a restricted token
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (requesterSession.getProperty(TOKEN_RESTRICTION_PROP) != null) {
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell res.setException(sid + " " + SessionBundle.getString("noPrivilege"));
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * In this group request is targeting a single session identified by
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * sid which is supposed to be hosted by this server instance sid is
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * used both as an id of a session and to authenticate the operation
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * (performed on own session)
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (req.getMethodID() == SessionRequest.DestroySession) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * also check that sid is not a restricted token
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (requesterSession.getProperty(TOKEN_RESTRICTION_PROP) != null) {
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell res.setException(sid + " " + SessionBundle.getString("noPrivilege"));
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell sid = new SessionID(req.getDestroySessionID());
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell } else if (req.getMethodID() == SessionRequest.SetProperty) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * This fix is to avoid clients sneaking in to set
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * protected properties in server-2 or so through
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * server-1. Short circuit this operation without
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * forwrading it further.
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell "SessionRequestHandler.processRequest:"
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell + "Client does not have permission to set"
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell + " - property key = " + req.getPropertyName()
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell + " : property value = " + req.getPropertyValue());
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell res.setException(sid + " " + SessionBundle.getString("noPrivilege"));
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (!serviceConfig.isSessionFailoverEnabled()) {
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // TODO check how this behaves in non-session failover case
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell URL originService = SESSION_SERVICE_URL_SERVICE.getSessionServiceURL(sid);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (!serverConfig.isLocalSessionService(originService)) {
1d407e39b7d8f68d9a2b1e178f35fab037d9835aRobert Wapshott String siteID = sid.getExtension().getSiteID();
1d407e39b7d8f68d9a2b1e178f35fab037d9835aRobert Wapshott String primaryID = sid.getExtension().getPrimaryID();
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell String localServerID = serverConfig.getLocalServerID();
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if ( (primaryID != null) && (localServerID != null) )
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell throw new SessionException("invalid session id");
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (serviceConfig.isUseInternalRequestRoutingEnabled()) {
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell String hostServerID = sessionService.getCurrentHostServer(sid);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (!serverConfig.isLocalServer(hostServerID)) {
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell return forward(SESSION_SERVICE_URL_SERVICE.getSessionServiceURL(hostServerID), req);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // attempt retry
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (!sessionService.checkServerUp(hostServerID)) {
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // proceed with failover
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell String retryHostServerID = sessionService.getCurrentHostServer(sid);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (retryHostServerID.equals(hostServerID)) {
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // we have a shot at retrying here
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // if it is remote, forward it
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // otherwise treat it as a case of local
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (!serverConfig.isLocalServer(retryHostServerID)) {
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell return forward(SESSION_SERVICE_URL_SERVICE.getSessionServiceURL(retryHostServerID), req);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // Likely an unreachable code block [AME-5701]:
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // SessionServiceConfig sets useInternalRequestRouting=true if SMS property
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // "iplanet-am-session-sfo-enabled" is true
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // To enter this block, SMS value "iplanet-am-session-sfo-enabled" must be false
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // and the following System Properties must be set:
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // com.iplanet.am.session.failover.useInternalRequestRouting=false
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell // iplanet-am-session-sfo-enabled=true (in direct contradiction to SMS property with same name)
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell throw new AssertionError("Unreachable code");
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * We determined that this server is the host and the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * session must be found(or recovered) locally
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * if session is not already present locally attempt to
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * recover session if in failover mode
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (!sessionService.isSessionPresent(sid)) {
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell if (sessionService.recoverSession(sid) == null) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * if not in failover mode or recovery was not
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * successful return an exception
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * !!!!! IMPORTANT !!!!! DO NOT REMOVE "sid" FROM
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * EXCEPTIONMESSAGE Logic kludge in legacy Agent 2.0
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * code will break If it can not find SID value in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * the exception message returned by Session
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Service. This dependency should be eventually
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * removed once we migrate customers to a newer
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * agent code base or switch to a new version of
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Session Service interface
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell res.setException(sid + " " + SessionBundle.getString("sessionNotObtained"));
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell res.setException(sid + " " + SessionBundle.getString("unknownRequestMethod"));
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * request method-specific processing
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell res.addSessionInfo(sessionService.getSessionInfo(sid, req.getResetFlag()));
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell infos = sessionService.getValidSessions(requesterSession, pattern, status);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell sessionService.destroySession(requesterSession, new SessionID(req.getDestroySessionID()));
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell sessionService.addSessionListener(sid, req.getNotificationURL());
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell case SessionRequest.AddSessionListenerOnAllSessions:
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell * Cookie Hijacking fix to disable adding of Notification
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell * Listener for ALL the sessions over the network to the server
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell * instance specified by Notification URL This property can be
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell * added and set in the AMConfig.properties file should there be
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell * a need to add Notification Listener to ALL the sessions. The
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell * default value of this property is FALSE
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell sessionService.addSessionListenerOnAllSessions(requesterSession, req.getNotificationURL());
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell sessionService.setExternalProperty(this.clientToken, sid, req.getPropertyName(), req.getPropertyValue());
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell Object sessions = SessionCount.getSessionsFromLocalServer(uuid);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell res.setSessionsForGivenUUID((Map) sessions);
786bac66d599daf6355e45e64da84c846a857552Craig McDonnell res.setException(sid + " " + SessionBundle.getString("unknownRequestMethod"));
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster private SessionResponse forward(URL svcurl, SessionRequest sreq)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Object context = RestrictedTokenContext.getCurrent();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster sreq.setRequester(RestrictedTokenContext.marshal(context));
35ab1c5bca11317474fe12bdd8d22c17cdaf2697Robert Wapshott SessionResponse sres = sessionPLLSender.sendPLLRequest(svcurl, sreq);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster throw new SessionException(sres.getException());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster private static boolean getEnableAddListenerOnAllSessions() {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster enableAddListenerOnAllSessions = Boolean.valueOf(SystemProperties
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster .get(Constants.ENABLE_ADD_LISTENER_ON_ALL_SESSIONS));