private static boolean gisInitialized = false;
public static synchronized void initGIS(org.omg.CORBA.ORB orb)
{
GroupInfoService gis = null;
try {
if(_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "initGIS->: " + gisInitialized);
}
if (gisInitialized) {
return;
}
if (isGMSAvailableAndClusterHeartbeatEnabled()) {
gis = initGISUsesGMS();
} else {
gis = initGISUsesAdmin();
}
if (gis == null) {
return;
}
try {
((ORB)orb).register_initial_reference(
ORBConstants.FOLB_SERVER_GROUP_INFO_SERVICE,
(org.omg.CORBA.Object) gis);
if(_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE,
".initGIS: naming registration complete: "
+ gis);
}
gisInitialized = true;
if (_logger.isLoggable(Level.FINE)) {
gis = (GroupInfoService)
((ORB)orb).resolve_initial_references(
ORBConstants.FOLB_SERVER_GROUP_INFO_SERVICE);
List<ClusterInstanceInfo> lcii =
gis.getClusterInstanceInfo(null);
_logger.log(Level.FINE,
"Results from getClusterInstanceInfo:");
if (lcii != null) {
for (ClusterInstanceInfo cii : lcii) {
_logger.log(Level.INFO, toString(cii));