import java.security.Principal;
import java.security.cert.X509Certificate;
+import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@Override
public void start() throws LifecycleException {
// Start 'sub-realms' then this one
- for (Realm realm : realms) {
+ Iterator<Realm> iter = realms.iterator();
+
+ while (iter.hasNext()) {
+ Realm realm = iter.next();
if (realm instanceof Lifecycle) {
- ((Lifecycle) realm).start();
+ try {
+ ((Lifecycle) realm).start();
+ } catch (LifecycleException e) {
+ // If realm doesn't start can't authenticate against it
+ iter.remove();
+ log.error(sm.getString("combinedRealm.realmStartFail",
+ realm.getInfo()), e);
+ }
}
}
super.start();
combinedRealm.authFailed=Failed to authenticate user "{0}" with realm "{1}"
combinedRealm.authSucess=Authenticated user "{0}" with realm "{1}"
combinedRealm.addRealm=Add "{0}" realm, making a total of "{1}" realms
+combinedRealm.realmStartFail=Failed to start "{0}" realm
lockOutRealm.authLockedUser=An attempt was made to authenticate the locked user "{0}"
lockOutRealm.removeWarning=User "{0}" was removed from the failed users cache after {1} seconds to keep the cache size within the limit set