The JRMPProxyFactory does have one potentially useful config option.
If your service (say CacheJmxWrapper) exposes this method in its mbean interface:
public Object invoke(Invocation mi) throws Exception
then you can set the "InvokeTargetMethod" attribute on JRMPProxyFactory to
'false'. If configured that way, the detached invoker won't try to invoke the
target method (e.g. get(fqn, key)) but rather will invoke the invoke(Invocation mi)
method.
It is then the responsibility of your service to read the target method and args from the
Invocation and decide how to deal with them. This is how EJB2 containers work.
In the CacheJmxWrapper case, its implementation of invoke(Invocation mi) would read the
method name/args from the invocation and use reflection to invoke on the wrapped Cache.
Something like that could certainly be implemented, but not in the JBC code base. JBC
does not have visibility to the Invocation class. I would have to implement it in the AS
code base.
Want to find a better solution, as this seems like a general AS 5 problem -- exposing
Remoting-capable proxies for POJO services.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050279#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...