}
public synchronized void registerDivert(final Divert divert, final DivertConfiguration config) throws Exception
{
ObjectName objectName = objectNameBuilder.getDivertObjectName(divert.getUniqueName().toString());
DivertControl divertControl = new DivertControlImpl(divert, storageManager, config);
registerInJMX(objectName, new StandardMBean(divertControl, DivertControl.class));
registerInRegistry(ResourceNames.CORE_DIVERT + config.getName(), divertControl);
if (HornetQServerLogger.LOGGER.isDebugEnabled())
{