Bit of locking and logging cleanup
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 18 Feb 2008 09:22:19 +0000 (09:22 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 18 Feb 2008 09:22:19 +0000 (09:22 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2622 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/IdPProfileHandlerManager.java

index 0a20620..bf03359 100644 (file)
@@ -119,11 +119,16 @@ public class IdPProfileHandlerManager extends BaseReloadableService implements P
     protected void onNewContextCreated(ApplicationContext newServiceContext) {
         log.debug("{}: Loading new configuration into service", getId());
         Lock writeLock = getReadWriteLock().writeLock();
-        writeLock.lock();
-        loadNewErrorHandler(newServiceContext);
-        loadNewProfileHandlers(newServiceContext);
-        loadNewAuthenticationHandlers(newServiceContext);
-        writeLock.unlock();
+        try {
+            writeLock.lock();
+            loadNewErrorHandler(newServiceContext);
+            loadNewProfileHandlers(newServiceContext);
+            loadNewAuthenticationHandlers(newServiceContext);
+        } catch (Exception e) {
+            log.error("Error loading information from new context", e);
+        } finally {
+            writeLock.unlock();
+        }
     }
 
     /**