-#Thu Feb 08 11:30:51 EST 2007
+#Thu Feb 21 07:29:42 CET 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
import edu.internet2.middleware.shibboleth.common.profile.ProfileHandler;
import edu.internet2.middleware.shibboleth.common.profile.ProfileHandlerManager;
import edu.internet2.middleware.shibboleth.common.profile.provider.AbstractRequestURIMappedProfileHandler;
+import edu.internet2.middleware.shibboleth.common.service.ServiceException;
import edu.internet2.middleware.shibboleth.idp.authn.LoginHandler;
/**
}
/** {@inheritDoc} */
- protected void onNewContextCreated(ApplicationContext newServiceContext) {
+ protected void onNewContextCreated(ApplicationContext newServiceContext) throws ServiceException {
log.debug("{}: Loading new configuration into service", getId());
- Lock writeLock = getReadWriteLock().writeLock();
+ AbstractErrorHandler oldErrorHandler = errorHandler;
+ Map<String, AbstractRequestURIMappedProfileHandler> oldProfileHandlers = profileHandlers;
+ Map<String, LoginHandler> oldLoginHandlers = loginHandlers;
+
try {
- writeLock.lock();
loadNewErrorHandler(newServiceContext);
loadNewProfileHandlers(newServiceContext);
- loadNewAuthenticationHandlers(newServiceContext);
+ loadNewLoginHandlers(newServiceContext);
} catch (Exception e) {
- log.error("Error loading information from new context", e);
- } finally {
- writeLock.unlock();
+ errorHandler = oldErrorHandler;
+ profileHandlers = oldProfileHandlers;
+ loginHandlers = oldLoginHandlers;
+ throw new ServiceException(getId() + " configuration is not valid, retaining old configuration", e);
}
}
String[] profileBeanNames = newServiceContext.getBeanNamesForType(AbstractRequestURIMappedProfileHandler.class);
log.debug("{}: Loading {} new profile handlers.", getId(), profileBeanNames.length);
- profileHandlers.clear();
+ Map<String, AbstractRequestURIMappedProfileHandler> newProfileHandlers = new HashMap<String, AbstractRequestURIMappedProfileHandler>();
AbstractRequestURIMappedProfileHandler<?, ?> profileHandler;
for (String profileBeanName : profileBeanNames) {
profileHandler = (AbstractRequestURIMappedProfileHandler) newServiceContext.getBean(profileBeanName);
for (String requestPath : profileHandler.getRequestPaths()) {
- profileHandlers.put(requestPath, profileHandler);
+ newProfileHandlers.put(requestPath, profileHandler);
log.debug("{}: Loaded profile handler for handling requests to request path {}", getId(), requestPath);
}
}
+ profileHandlers = newProfileHandlers;
}
/**
*
* @param newServiceContext newly created application context
*/
- protected void loadNewAuthenticationHandlers(ApplicationContext newServiceContext) {
+ protected void loadNewLoginHandlers(ApplicationContext newServiceContext) {
String[] authnBeanNames = newServiceContext.getBeanNamesForType(LoginHandler.class);
log.debug("{}: Loading {} new authentication handlers.", getId(), authnBeanNames.length);
- loginHandlers.clear();
+ Map<String, LoginHandler> newLoginHandlers = new HashMap<String, LoginHandler>();
LoginHandler authnHandler;
for (String authnBeanName : authnBeanNames) {
authnHandler = (LoginHandler) newServiceContext.getBean(authnBeanName);
authnHandler.getSupportedAuthenticationMethods());
for (String authnMethod : authnHandler.getSupportedAuthenticationMethods()) {
- loginHandlers.put(authnMethod, authnHandler);
+ newLoginHandlers.put(authnMethod, authnHandler);
}
}
+ loginHandlers = newLoginHandlers;
}
}
\ No newline at end of file