users@shoal.java.net

RE: [Shoal-Users] Still not sure it's working

From: Mike Wannamaker <mwannama_at_opentext.com>
Date: Fri, 27 Jun 2008 11:40:32 -0400

I believe it's a bug then. In both accounts. My SERVER-1 only gets a
SERVER-1 message and SERVER-2 only gets a SERVER-1 message.

 

So when I say it only gets a SERVER-1 message I mean that the method

 

public void processNotification(Signal p_Signal)

 

is only being called with that message.

 

So if I start just SERVER-1, I see the GMS View Changed message, with
just the SERVER-1 in it, but my processNotification(...) is not called.
Not until I start SERVER-2 does it get called.

On SERVER-2, I see the original GMS View Changed with just SERVER-2, and
then GMS View Changed with SERVER-1,SERVER-2, but only get one
processNotification(...) call.

 

I will investigate further next week, but if you could have a look that
would be great. Is no one else seeing this?

 

This is my processNotification() method

 

            public void processNotification(Signal p_Signal)

            {

                        try

                        {

                                    p_Signal.acquire();

                                    SignalLogger log = new
SignalLogger(p_Signal);

                                    log.logIt();

                                    if(p_Signal instanceof
MessageSignal)

                                    {

                                                MessageSignal msgSig =
(MessageSignal)p_Signal;

                                                String sMember =
msgSig.getMemberToken();

 

                                                Object o =
ObjectUtil.toObject(msgSig.getMessage());

                                                if(o instanceof
SMessage)

                                                {

                                                            SMessage
smsg = (SMessage)o;

                                                            InetAddress
sender = m_hmMembers.get(sMember).address;

 
smsg.setSender(sender);

 
SMessageLogger.log.systemInfo(getClass(), "FireMessage: " + smsg);

 
fireMessageReceived(smsg);

 
//fireMessageReceived(smsg);

                                                }

                                                else

                                                {

 
SMessageLogger.log.systemInfo(getClass(), "Message is NOT SMessage??");

                                                }

                                    }

                                    else if(p_Signal instanceof
JoinNotificationSignal)

                                    {

                                                JoinNotificationSignal
joinSig = (JoinNotificationSignal)p_Signal;

 
processClusterNotification();

                                    }

                                    else if(p_Signal instanceof
JoinedAndReadyNotificationSignal)

                                    {

 
JoinedAndReadyNotificationSignal joinSig =
(JoinedAndReadyNotificationSignal)p_Signal;

 
processClusterNotification();

                                    }

                                    else if(p_Signal instanceof
FailureSuspectedSignal)

                                    {

                                                FailureSuspectedSignal
suspectSig = (FailureSuspectedSignal)p_Signal;

 
processClusterNotification();

                                    }

                                    else if(p_Signal instanceof
FailureRecoverySignal)

                                    {

                                                FailureRecoverySignal
failureSig = (FailureRecoverySignal)p_Signal;

 
processClusterNotification();

                                    }

                                    else if(p_Signal instanceof
FailureNotificationSignal)

                                    {

 
FailureNotificationSignal failureSig =
(FailureNotificationSignal)p_Signal;

 
processClusterNotification();

                                    }

                                    else if(p_Signal instanceof
PlannedShutdownSignal)

                                    {

                                                PlannedShutdownSignal
shutdownSig = (PlannedShutdownSignal)p_Signal;

 
processClusterNotification();

                                    }

                                    else

                                    {

 
SMessageLogger.log.debug(getClass(), "Received Notification of type : "
+ p_Signal.getClass().getName() + " Server: " +
p_Signal.getMemberToken());

 

                                    }

                        }

                        catch(SignalAcquireException e)

                        {

                                    SMessageLogger.log.fatal(getClass(),
"Exception occured while acquiring signal", e);

                        }

                        finally

                        {

                                    try

                                    {

                                                p_Signal.release();

                                    }

                                    catch(SignalReleaseException e)

                                    {

 
SMessageLogger.log.warn(getClass(), "Exception occured while releasing
signal" , e);

                                    }

                        }

 

            }

 

 

________________________________

From: Shreedhar.Ganapathy_at_Sun.COM [mailto:Shreedhar.Ganapathy_at_Sun.COM]
Sent: June 27, 2008 11:21 AM
To: users_at_shoal.dev.java.net
Subject: Re: [Shoal-Users] Still not sure it's working

 

Hi Mike
The expected behavior is that as each server starts, its registered GMS
client components will be notified of the server's own joining the group
and any subsequent joins of other members.
So in essence, server-1 GMS clients should see a JoinNotificationSignal
for server-1, and another for server-2
and in server-2, GMS clients should see a JoinNotificationSignal for
server-2 and another for server-1.
The order here does not matter but correctness is important and if not
its a bug to be fixed.

In the log below, Server-1 seems to be getting its own
JoinNotificationSignal which is correct. Does it ever get the
JoinNotificationSignal for server-2?
On server-2, I am seeing correct behavior.

(Ignore the log statements that show the view contents, as that is an
event coming from the provider implementation - GMS notification signals
are the ones that GMS clients should look in for correctness).

Let me know.
Thanks
Shreedhar

Mike Wannamaker wrote:

Hi Guys,

 

I'm still not sure it's working as it's supposed to? But maybe it is?

 

Start SERVER-1

Start SERVER-2

 

            On SERVER-1 I get a JoinMessage but it is from SERVER-1?

            On SERVER-2 I get a Join Message from SERVER-1, which is
what I would expect?

 

Is this correct? This depends on when the two servers are started. If I
wait for a period between startups I get SERVER-2 startup message on
SERVER-1 and SERVER-1 startup message on SERVER-2. But if I start them
both at the same time I get the above behaviour?

 

 

 

Starting both at virtually the same time I get ...

 

SEVER-1 Output:

 

27-Jun-2008 12:40:29 AM com.sun.enterprise.ee.cms.impl.jxta.ViewWindow
getMemberTokens

INFO: GMS View Change Received for group RCS_CLUSTER : Members in view
for (before change analysis) are :

1: MemberId: SERVER-1, MemberType: CORE, Address:
urn:jxta:uuid-2F39FF376B6A43E3905DAFC81B7D02FDB946A28335F0413BBF73B77CCC
8BFEC603

 

27-Jun-2008 12:40:29 AM com.sun.enterprise.ee.cms.impl.jxta.ViewWindow
newViewObserved

INFO: Analyzing new membership snapshot received as part of event :
MASTER_CHANGE_EVENT

27-Jun-2008 12:40:38 AM com.sun.enterprise.ee.cms.impl.jxta.ViewWindow
getMemberTokens

INFO: GMS View Change Received for group RCS_CLUSTER : Members in view
for (before change analysis) are :

1: MemberId: SERVER-2, MemberType: CORE, Address:
urn:jxta:uuid-2F39FF376B6A43E3905DAFC81B7D02FD0D4B867250FF460C9B539A1617
79845B03

2: MemberId: SERVER-1, MemberType: CORE, Address:
urn:jxta:uuid-2F39FF376B6A43E3905DAFC81B7D02FDB946A28335F0413BBF73B77CCC
8BFEC603

 

27-Jun-2008 12:40:38 AM com.sun.enterprise.ee.cms.impl.jxta.ViewWindow
newViewObserved

INFO: Analyzing new membership snapshot received as part of event :
ADD_EVENT

27-Jun-2008 12:40:38 AM DEBUG [pool-1-thread-1]
com.opentext.ecm.services.smessage.impl.shoal.SignalLogger - - SERVER-1
>> JoinNotificationSignalImpl @ 27/06/08 12:40 AM - [RCS_CLUSTER]:
(Hashtable:[(String:server.name)<-->(String:SERVER-1),
(String:local.host)<-->(Inet4Address:mwana0061/10.6.2.89)])

 

Server-2 Output

 

27-Jun-2008 12:40:30 AM com.sun.enterprise.ee.cms.impl.jxta.ViewWindow
getMemberTokens

INFO: GMS View Change Received for group RCS_CLUSTER : Members in view
for (before change analysis) are :

1: MemberId: SERVER-2, MemberType: CORE, Address:
urn:jxta:uuid-2F39FF376B6A43E3905DAFC81B7D02FD0D4B867250FF460C9B539A1617
79845B03

 

27-Jun-2008 12:40:30 AM com.sun.enterprise.ee.cms.impl.jxta.ViewWindow
newViewObserved

INFO: Analyzing new membership snapshot received as part of event :
MASTER_CHANGE_EVENT

27-Jun-2008 12:40:38 AM com.sun.enterprise.ee.cms.impl.jxta.ViewWindow
getMemberTokens

INFO: GMS View Change Received for group RCS_CLUSTER : Members in view
for (before change analysis) are :

1: MemberId: SERVER-2, MemberType: CORE, Address:
urn:jxta:uuid-2F39FF376B6A43E3905DAFC81B7D02FD0D4B867250FF460C9B539A1617
79845B03

2: MemberId: SERVER-1, MemberType: CORE, Address:
urn:jxta:uuid-2F39FF376B6A43E3905DAFC81B7D02FDB946A28335F0413BBF73B77CCC
8BFEC603

 

27-Jun-2008 12:40:38 AM com.sun.enterprise.ee.cms.impl.jxta.ViewWindow
newViewObserved

INFO: Analyzing new membership snapshot received as part of event :
ADD_EVENT

27-Jun-2008 12:40:44 AM DEBUG [pool-1-thread-1]
com.opentext.ecm.services.smessage.impl.shoal.SignalLogger - - SERVER-1
>> JoinNotificationSignalImpl @ 27/06/08 12:40 AM - [RCS_CLUSTER]:
(Hashtable:[(String:server.name)<-->(String:SERVER-1),
(String:local.host)<-->(Inet4Address:mwana0061/10.6.2.89)])