Re: [jgroups-users] v3->v4: my ReceiverAdapter methods are not being called

Questions/problems related to using JGroups <[email protected]> Mon, 6 Nov 2017 15:40:05 -0500
Newsgroups gmane.comp.java.javagroups.general
Message-ID <mailman.25977.1510000833.12770.javagroups-users@lists.sourceforge.net>
On Mon, Nov 6, 2017 at 8:37 AM, Questions/problems related to using JGroups
<[email protected]> wrote:

> Your methods are never called because the MessageDispatcher catches all of
> these messages!


Thank you -- I definitely missed that in the docs and didn't expect it. I
have my view changes and state back!

So I've pulled my 'jChannel.setReceiver(this);' and have:

        jChannel = env.createJChannel(this);
        dispatcher = new MessageDispatcher(jChannel, this);
        dispatcher.setMembershipListener(this);
        dispatcher.setStateListener(this);

In v3, I was used to MD#castMessage going to handle() and JChannel#send
going to receive(). To be really clear, are you saying that, since we have
a MessageDispatcher, I should no longer use channel#send and should convert
those calls to use the MessageDispatcher?

And I don't need this I guess, right? (If so, what is this method for?)

        dispatcher.setRequestHandler(this);

Thanks,
Bobby

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
javagroups-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/javagroups-users