RealmPrincipal realmPrincipal = ConfigurationUtil.generateRealmPrincipal(realm, domain, className, principalName, classLoader);
if (realmPrincipal == null) {
throw new GeronimoSecurityException("Unable to create realm principal");
}
PrimaryRealmPrincipal primaryRealmPrincipal = null;
try {
primaryRealmPrincipal = ConfigurationUtil.generatePrimaryRealmPrincipal(realm, domain, className, principalName, classLoader);
} catch (DeploymentException e) {
throw new GeronimoSecurityException("Unable to create primary realm principal", e);
}