From: <ovi...@jb...> - 2005-05-04 04:21:31
|
anonymous wrote : 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. You are right, I totally disregarded pull callbacks, since I don't use them, so far. anonymous wrote : 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. That will do. Will you also avoid generating error messages in case of an user HandleCallbackException and let the client code worry about it? anonymous wrote : 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. The whole point of using callbacks was to avoid the need of opening a second connection from server to client. This won't be possible if the client sits behind a firewall. I know that this is exactly what remoting does behind the scenes right now, but I hope we will have a UIL2-like transport in the future that will make this issue irrelevant. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3876385#3876385 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3876385 |