First pass to clean up config and fix multi serivce instance bug
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / idp / session / IdPSessionFilter.java
index b21b940..e1a6a88 100644 (file)
@@ -74,7 +74,12 @@ public class IdPSessionFilter implements Filter {
 
     /** {@inheritDoc} */
     public void init(FilterConfig filterConfig) throws ServletException {
-        sessionManager = (SessionManager<Session>) filterConfig.getServletContext().getAttribute("sessionManager");
+        String sessionManagerId = filterConfig.getInitParameter("sessionManagedId");
+        if (DatatypeHelper.isEmpty(sessionManagerId)) {
+            sessionManagerId = "shibboleth.SessionManager";
+        }
+
+        sessionManager = (SessionManager<Session>) filterConfig.getServletContext().getAttribute(sessionManagerId);
     }
 
     /**