Re: [jgroups-users] [ Migration to jgroup 4.0 ]

Questions/problems related to using JGroups <[email protected]> Tue, 27 Jun 2017 07:40:48 +0200
Newsgroups gmane.comp.java.javagroups.general
Message-ID <mailman.7315.1498542060.17326.javagroups-users@lists.sourceforge.net>

On 26/06/17 22:56, Questions/problems related to using JGroups wrote:
> Hi, it seems to be time to migrate to 4.0.x!
> You've done a great job!
>
> I briefly read API changes in the blog and tried to port my app.
> Everything ok, except two things.
>
> 1. In the app. I combined a message receiver and a rpc-dispatching. So,
> in 4.0.x I haven't seen the way to use it with one channel.


Yes, I changed this because receivers and RpcDispatchers were eating 
each other messages. Now, you can use fork channels: one ForkChannel for 
the receiver and another one for the RpcDispatcher, both sitting on the 
same JChannel.


> The following code doesn't work anymore:
>
> class MembershipService extend ReceiverAdapter
> ....
> channel = new JChannel(...);
> channel.setDiscardOwnMessages(true);
> channel.setName(name);
> channel.setReceiver(this);
>
> dispatcher = new RpcDispatcher(channel, this);
> dispatcher.setMethodLookup(methods::get);
> dispatcher.setMembershipListener(this);
>
> channel.connect(CLUSTER_NAME);
> channel.getState(null, 10000);
>
> When the rpc-disptching is active, messages are not received by the
> MembershipService.
>
> So, how is it possible to combine it?
>
> 2. Another minor problem, Address type is not serializable anymore.

Use Util.writeAddress() / Util.readAddress()


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

-- 
Bela Ban | http://www.jgroups.org


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