Re: [javagroups-users] RpcDispatcher, VotingAdpater incompatibility ?
Brought to you by:
belaban
From: Franck <fr...@eb...> - 2006-11-29 09:38:00
|
Thanks Bela ! I've realized that when looking at the source code of VotingAdapter. I'll adapt my code. Thanks, Franck Bela Ban wrote: > The problem is that you create 2 instances of RpcDispatcher on the > *same* channel (see <=== below). > The 2 instances are eating the messages off of the same Channel, so > this won't work. Take a look at VotingAdapterTest for a unit test. > > You could use the Multiplexer as an alternative if you wanted 2 or > more blocks to run on the same channel, see > http://www.jgroups.org/javagroupsnew/docs/manual/html/user-advanced.html#d0e2318 > for details. > > public RpcAndVotingObject(boolean addvoting) throws ChannelException { > VotingAdapter votingadapter; > DistributedLockManager dl_manager; > > _channel = new JChannel(PROTOCOL_STACK); > _rpcdispatcher = new RpcDispatcher(_channel, null, null, > this); > > if (addvoting) { > votingadapter = new VotingAdapter(_channel); // <===== > *** create another RpcDispatcher > // dl_manager = new > DistributedLockManager(votingadapter, "_lock_manager"); > } > } > > \ >> > -- ___________________________________________ Franck Valentin EMBL - The EBI Wellcome Trust Genome Campus Hinxton, Cambridge CB10 1SD http://www.ebi.ac.uk Email: fr...@eb... ____________________________________________ |