}
private Properties getGMSConfigProps() throws GMSEventListenerException {
Properties props = new Properties();
Config config;
Cluster cluster;
ConfigContext configContext;
try {
configContext = AdminService.getAdminService().getAdminContext()
.getAdminConfigContext();
cluster = ClusterHelper.getClusterByName(configContext, clusterName);
String configRef = cluster.getConfigRef();
config = ConfigAPIHelper.getConfigByName(configContext, configRef);
com.sun.enterprise.config.serverbeans.GroupManagementService gmsConfig =
config.getGroupManagementService();
if(!gmsConfig.isEnabled()){
String message = _logger.getResourceBundle().
getString("clb.gms_not_enabled") + clusterName;
throw new GMSEventListenerException(message);
}
props.put(ServiceProviderConfigurationKeys.FAILURE_DETECTION_RETRIES.toString(),
gmsConfig.getFdProtocolMaxTries());
props.put(ServiceProviderConfigurationKeys.FAILURE_DETECTION_TIMEOUT.toString(),
gmsConfig.getFdProtocolTimeoutInMillis());
props.put(ServiceProviderConfigurationKeys.DISCOVERY_TIMEOUT.toString(),
gmsConfig.getPingProtocolTimeoutInMillis());
props.put(ServiceProviderConfigurationKeys.FAILURE_VERIFICATION_TIMEOUT.toString(),
gmsConfig.getVsProtocolTimeoutInMillis());
String timeout = gmsConfig.getFailureDetectionTCPRetransmitTimeout();
if (timeout != null)
props.put(ServiceProviderConfigurationKeys.FAILURE_DETECTION_TCP_RETRANSMIT_TIMEOUT.toString(),
timeout);
props.put(ServiceProviderConfigurationKeys.MULTICASTADDRESS.toString(),
cluster.getHeartbeatAddress());
props.put(ServiceProviderConfigurationKeys.MULTICASTPORT.toString(),
cluster.getHeartbeatPort());
} catch (ConfigException e) {
_logger.log(Level.SEVERE,
"clb.exception_getting_properties_for_gms_module",
new Object[]{clusterName, e.getMessage()});
if(_logger.isLoggable(Level.FINE))