Remoting is just a mechanism for making remote invocations (including callbacks). It has no concept of contextual processing. There has to be a ServerInvocationHandler on the server side to process invocation requests, including adding and removing of callback listeners. The ServerInvocationHandler is also responsible for generating the callbacks (remoting itself has not idea of when a callback should be generated or what it contains, it only knows how to get the callback sent to the original listener).
The concept is similar to jmx notifications. The listener asks the MBeanServer to add itself as a listener to a particular MBean. That MBean generates a notification and emits it (which goes back through the MBeanServer, in the case that the listener is an MBean). Just substitue remoting for MBeanServer and ServerInvocationHandler for the target MBean. In the actual implementation, the client callback listener does not go across the wire. Instead, the ServerInvoker will create a proxy back to that client callback listener and register this proxy as the callback listener with the ServerInvocationHandler on the server side. When the ServerInvocationHandler generates a callback message and calls on its local list of callback listeners to handle the callback, it is calling on the proxy. The proxy will either store the callback (in the case of pull callbacks until the client calls to get them) or will calll back on the callback server directly with the new callback. org.jboss.samples.callback.CallbackClient and org.jboss.samples.callback.CallbackServer show an example of both the pull and push callbacks. This is all by design. If we need to add additional/different behavior, will need to be viewed as a new feature. I'm fine with this, just need the requirements. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3871574#3871574 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3871574 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ JBoss-Development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-development
