+ ":type=Engine"), null);
if (engines.size() == 0) {
StandardEngine engine = new StandardEngine();
//Add JBossSecurityMgrRealm
JBossSecurityMgrRealm realm = new JBossSecurityMgrRealm();
realm.setCertificatePrincipal("org.jboss.security.auth.certs.SubjectDNMapping");
realm.setAllRolesMode("authOnly");
engine.setRealm(realm);
Registry.getRegistry().registerComponent(realm,
new ObjectName(DOMAIN_NAME + ":type=Realm"), null);