if (managementStrategy != null) {
LOG.info("Using custom ManagementStrategy: " + managementStrategy);
getContext().setManagementStrategy(managementStrategy);
}
EventFactory eventFactory = getBeanForType(EventFactory.class);
if (eventFactory != null) {
LOG.info("Using custom EventFactory: " + eventFactory);
getContext().getManagementStrategy().setEventFactory(eventFactory);
}