Adjust logging/error-handling, schema fixes, failed message handling.
[shibboleth/sp.git] / shibsp / impl / XMLServiceProvider.cpp
index b7d6f39..e67dfa8 100644 (file)
@@ -943,8 +943,16 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, const XMLConfig* o
                     }\r
                 }\r
                 else {\r
-                    log.info("building in-process SessionCache of type %s...",REMOTED_SESSION_CACHE);\r
-                    m_outer->m_sessionCache=conf.SessionCacheManager.newPlugin(REMOTED_SESSION_CACHE,NULL);\r
+                    child=XMLHelper::getFirstChildElement(SHIRE,_SessionCache);\r
+                    if (child) {\r
+                        auto_ptr_char type(child->getAttributeNS(NULL,_type));\r
+                        log.info("building SessionCache of type %s...",type.get());\r
+                        m_outer->m_sessionCache=conf.SessionCacheManager.newPlugin(type.get(),child);\r
+                    }\r
+                    else {\r
+                        log.warn("SessionCache unspecified, building SessionCache of type %s...",REMOTED_SESSION_CACHE);\r
+                        m_outer->m_sessionCache=conf.SessionCacheManager.newPlugin(REMOTED_SESSION_CACHE,child);\r
+                    }\r
                 }\r
             }\r
         } // end of first-time-only stuff\r