ConnectionFactoryAdvised advised = (ConnectionFactoryAdvised)Dispatcher.instance.getTarget(uniqueName);
if (advised == null)
{
return -1;
}
ServerConnectionFactoryEndpoint endpoint = (ServerConnectionFactoryEndpoint)advised.getEndpoint();
int size = endpoint.getCallbackHandlers().size();
return new Integer(size);
}