From: <tom...@jb...> - 2005-05-04 03:35:58
|
The use case helps me understand what you are after. Thanks. I still don't think returning an Object from the handleCallback() method is a good idea since, from the server side, will never be sure of the real behavior (if client is pulling the callbacks, the return from the handleCallback() method will always be null, even if this is not the value the client intended to return). This is just the nature of allowing pull model for callbacks. I would be happy to (and will) add a getUserException() to the HandleCallbackException, which will be null in the case of pull callbacks. All of this I have commented in JBREM-93. What I think you really need is the ability to make return invocations on the client (or to be more specific, the client's server) directly, without having to use the callback API (because of the whole push/pull issue). My initial thought on this is to actually supply a Client object in the InvocationRequest given to the ServerInvocationHandler implementation (via the invoke() method). This way you can keep a reference to this client as you wish and call directly on it. This can be a synchronous or asynchronous (oneway) call... however you want to do it. If is synchronous, there will be a return value supplied as well as throw an exception if needed. I am just thinking aloud here, so let me know if you think this would be a better fit for you? Adrian, feel free to add your 2 cents on this idea as well. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3876376#3876376 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3876376 |