*/
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, ENABLE_SSO, getID());
}
GlassFishSingleSignOn sso = null;
//find existing SSO (if any), in case of a reconfig
GlassFishValve[] valves = getValves();
for (int i=0; valves!=null && i<valves.length; i++) {
if (valves[i] instanceof GlassFishSingleSignOn) {
sso = (GlassFishSingleSignOn)valves[i];
break;
}
}
if (sso != null && this.ssoFailoverEnabled != ssoFailoverEnabled) {
removeValve(sso);
sso = null;
// then SSO Valve will be recreated
}
if (sso == null) {
SSOFactory ssoFactory =
webContainerFeatureFactory.getSSOFactory();
sso = ssoFactory.createSingleSignOnValve(getName());
this.ssoFailoverEnabled = ssoFailoverEnabled;
setSingleSignOnForChildren(sso);
addValve((GlassFishValve) sso);
}
// set max idle time if given
Property idle = vsBean.getProperty(SSO_MAX_IDLE);
if (idle != null && idle.getValue() != null) {
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, SSO_MAX_INACTIVE_SET, new Object[]{idle.getValue(), getID()});
}
sso.setMaxInactive(Integer.parseInt(idle.getValue()));
}
// set expirer thread sleep time if given
Property expireTime = vsBean.getProperty(SSO_REAP_INTERVAL);
if (expireTime !=null && expireTime.getValue() != null) {
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, SSO_REAP_INTERVAL_SET);
}
sso.setReapInterval(Integer.parseInt(expireTime.getValue()));
}
configureSingleSignOnCookieSecure();
configureSingleSignOnCookieHttpOnly();
}