Does AS 5 have any POJO equivalent to the JRMPProxyFactory? I.e. a service you can create where you inject some POJO service, an InvokerLocator, a JNDI name and an interface name, and it creates a Remoting proxy to your service and binds it in JNDI?
Had a quick look at @JndiBinding but it seems that just does a simple binding.
Looks like the needed stuff is there in org.jboss.aspects.remoting.Remoting, but wondered if there is work being done on /plan for a service or aspect that packages it all together.
This is needed for JBC, which can no longer expose a Cache proxy via JNDI since no mbean service implements the Cache interface.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050282#4050282
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050282
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#4050279
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050279