Principal domainPrincipal = ConfigurationUtil.generatePrincipal(className, principalName, classLoader);
if (domainPrincipal == null) {
throw new GeronimoSecurityException("Unable to create principal");
}
PrimaryPrincipal primaryDomainPrincipal = null;
try {
primaryDomainPrincipal = ConfigurationUtil.generatePrimaryPrincipal(className, principalName, classLoader);
} catch (DeploymentException e) {
throw new GeronimoSecurityException("Unable to create primary principal", e);
}