/** * Return the SubType of a Security Factory in the current server. * @param p_NameFactory The factory name to find * @return The SubType or null if not found * @throws ManagementException any. * @throws MalformedObjectNameException if the objectName is malformed */ public static String findSecurityFactorySubType(final String p_NameFactory, final String domainName, final String serverName) throws MalformedObjectNameException { String sName; String sSubType = null; ObjectName on = null; Iterator itNames = getListMBeanName(JonasObjectName.allSecurityFactories(domainName), serverName).iterator(); while (itNames.hasNext()) { on = new ObjectName(itNames.next().toString()); sName = on.getKeyProperty("name"); if (p_NameFactory.equals(sName) == true) { sSubType = on.getKeyProperty("subtype"); break; } } return sSubType; }