{
try
{
MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
IdentityServiceController identityService = (IdentityServiceController)MBeanProxy.get(
IdentityServiceController.class, new ObjectName("portal:service=Module,type=IdentityServiceController"), mbeanServer);
eventBroadcaster = (IdentityEventBroadcaster)identityService.getIdentityContext().getObject(IdentityContext.TYPE_IDENTITY_EVENT_BROADCASTER);
}
catch (Exception e)
{
log.error("Failed to obtain IdentityEventBroadcaster. RoleUpdatedEvent won't be broadcasted");
}