DomainPrincipal domainPrincipal = ConfigurationUtil.generateDomainPrincipal(realm, className, principalName, classLoader);
if (domainPrincipal == null) {
throw new GeronimoSecurityException("Unable to create domain principal");
}
PrimaryDomainPrincipal primaryDomainPrincipal = null;
try {
primaryDomainPrincipal = ConfigurationUtil.generatePrimaryDomainPrincipal(realm, className, principalName, classLoader);
} catch (DeploymentException e) {
throw new GeronimoSecurityException("Unable to create primary domain principal", e);
}