-
1. Re: User question: programming model
tom.elrod Apr 27, 2005 1:56 PM (in response to dls_dls_dls)The intention of the remoting framework was to provide a generic way of making remote invocations, regardless of transport or data marshalling (only config change required instead of code changes).
An example of what you are asking about can be found in org.jboss.mx.remoting.JMXSubsystemInvocationHandler. This class is a JMX subsystem handler which maps the invocations to the proper JMX call. Although it has to have conditional code (just like would have if using a dynamic proxy), it only has to be written once and can change out the protocol over which it is called (http, socket, rmi, etc.) by just making configuration changes, and not code changes.
If wanted even more flexibility in your handler, could have a concrete API class that the handler uses reflection to call upon based on the invocation object (would use NameBaseInvocation for this).