@Override
public void configure(Configuration configuration) throws ConfigurationException {
// get the configured security domain name.
String securityDomain = configuration.getAttribute(JacORBSubsystemConstants.SECURITY_SECURITY_DOMAIN);
if (securityDomain == null)
throw new ConfigurationException("Error configuring domain socket factory: security domain is null");
// use the security domain name to obtain the JSSE security domain.
try {
InitialContext context = new InitialContext();
this.jsseSecurityDomain = (JSSESecurityDomain) context.lookup(SecurityConstants.JAAS_CONTEXT_ROOT +
securityDomain + "/jsse");
log.debugf("Obtained JSSE security domain with name %s", securityDomain);
} catch (NamingException ne) {
log.errorf("Failed to obtain JSSE security domain with name %s", securityDomain);
throw new ConfigurationException("Error configuring domain socket factory: failed to lookup JSSE security domain");
}
}