//noinspection unchecked
osgiConfig = ConfigurationParameters.of(context.getProperties());
String idpName = osgiConfig.getConfigValue(PARAM_IDP_NAME, "");
String sncName = osgiConfig.getConfigValue(PARAM_SYNC_HANDLER_NAME, "");
Whiteboard whiteboard = new OsgiWhiteboard(context.getBundleContext());
try {
SyncMBeanImpl bean = new SyncMBeanImpl(repository, syncManager, sncName, idpManager, idpName);
Hashtable<String, String> table = new Hashtable<String, String>();
table.put("type", "UserManagement");
table.put("name", "External Identity Synchronization Management");
table.put("handler", ObjectName.quote(sncName));
table.put("idp", ObjectName.quote(idpName));
mbeanRegistration = whiteboard.register(SynchronizationMBean.class, bean, ImmutableMap.of(
"jmx.objectname",
new ObjectName("org.apache.jackrabbit.oak", table))
);
} catch (MalformedObjectNameException e) {
log.error("Unable to register SynchronizationMBean.", e);