// any existing jmx agent will be modified with remote connector settings
agent = createJmxAgent();
// there must be only one jmx agent, so lookup by type instead
if (registry.lookupObject(AbstractJmxAgent.class) == null)
{
registry.registerAgent(agent);
}
agent = createJmxNotificationAgent();
if (!isAgentRegistered(agent))
{