Here's what I've got so far.
As a first approximation, replacing the current Messaging push callbacks with
Remoting's polling simulation of push callbacks is pretty easy. On the client side,
CallbackManager is transformed from a ServerInvocationHandler to an
InvokerCallbackHandler. When the Remoting poller pulls callbacks from the server, it
passes them to CallbackManager, which proceeds as before.
On the server side, instead of passing around the remoting callback Client, which was
being used to make explicit invocations that were processed by CallbackManager, the
ServerInvokerCallbackHandler from which the callback Client was obtained is passed around.
Instead of calling Client.invoker(), ServerConsumerEndpoint.Deliverer calls
ServerInvokerCallbackHandler.handleCallback(), which, since it is configured for pull
callbacks, just stores the callback with its load of messages. Eventually the client side
poller will retrieve them and pass them to CallbackManager.
To some extent, these changes work. E.g., simple tests like HttpExample and QueueExample
work. However, some of the more complex tests, for example, MessageConsumerTest.redel8(),
fail. It looks like CallbackManager is trying to deliver the messages to a Consumer that
has already closed.
I'll need to look at this some more.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973481#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...