admin@glassfish.java.net

Code Review Request for calling gms announceGroupStartup in cluster/admin module StartClusterCommand.java

From: Joseph Fialli <joe.fialli_at_oracle.com>
Date: Tue, 27 Jul 2010 11:43:05 -0400

  All,

During the GMS arch review, I asked whether it would be appropriate to
use @Supplemental
or to just place calls to appropriate GMS API directly into the
StartClusterCommand to achieve this.
No one knew the correct answer for my description so we settled on the
approach of
coding it inline to illustrate what needed to be done.
These GMS APIs existed in glassfish v2.1 and were called in the
serverbean that managed
start-cluster.

The end result was I have put together what needs to be done directly in
StartClusterCommand.java.
I have attached those changes and corresponding pom.xml changes needed.
This code is tested to work (and needed for me to be able to close
glassfish issue tracker 12730)
The code is written to work if gms is not enabled in any cluster that is
in domain.xml
AND if gms is not enabled for cluster that is being started.

If it is more appropriate for this functionality to be done with
@Supplemental, we will do it that way.
This review request was intended to illustrate what needs to be done.
(Note: we are not open to changing the SHOAL GMS api for
announceGroupStartup().
These methods existed in previous versions of GMS (and worked in
Glassfish v2.1 as is).)

Note that a similar change needs to be done for StopClusterCommand
calling gms announceGroupShutdown().

There is outstanding todos in submitted code:
1. on gettting the failed instance names out of the ActionReport
//unsure if this is accessible or not from @Supplemental
2. enhance logger.warning messages // will change if code is moved to
@Supplemental. So it is minimal effort at this point.

-Joe