I'm writing a simple agent application that will be used for monitoring JBoss server conditions and configuration. The agent application will call some MBean methods to query information on some JBoss components (queues for example).
Currently I'm undecided between two possible ways on using this agent
application: either using the JMX RMI adaptor (http://www.jboss.org/wiki/Wiki.jsp?page=UsingTheRMIAdaptor), or invoking a servlet that will call the agent's method and return some data over HTTP. I'm also concerned with the performance on the network usage as well as security (preventing unwanted applications to use the agent) of using RMI or HTTP.
What's the recommended implementation? RMI or HTTP?
Another option is to write my own socket protocol implementation (using NIO), but I'm refraining to do this due to time constraint.
Unless you need to traverse a firewall, you're probably better off using RMI