users@shoal.java.net

Re: Shoal - Unable acquire FailureRecoverySignal

From: Chathurika Sandarenu <sandarenu_at_gmail.com>
Date: Mon, 3 Nov 2008 08:42:41 +0530

Hi Bongjae Chang,

Thanks for replying. I'm using FailureRecoveryActionFactoryImpl when I'm
registering for group events.
gms.addActionFactory(recoveryComponent, new
FailureRecoveryActionFactoryImpl(object));

According to your reply this means that I don't have to call
faliureNotify.acquire() from my callback function.

In my application there are 2 servers; server1(main server) and
server2(backup server). If the server1 fails server2 has to start operations
and when server1 come back, server2 has to stop and allow server1 to perform
operations. When server1 come live after a failure I have to block it until
server2 stops the operations. Is there a way in shoal which I can use to
program this requirement.
Currently I'm using FailureRecoverySignal to start operations on server2
when server1 starts. And I use JoinNotificationSignal from server1 to stop
the operations of server2. But with this model I've a problem because for
small period of time both servers are performing operations.

I saw that in shoal there is isFenced() method to handle these kind of
senarios. Previosly I tried to use faliureNotify.acquire() to raise the
fence on failed server and stop it from joining to the group when it come
back live. But that was not a success since it throw an exception.

Can you please help on this?

Regards,
Chathurika Sandarneu.