static public InputStream findClusterXML(String _clusterXML){
  String schemaNameToBeUsed=_clusterXML;
  InputStream schemaInputStream;
  String schemaFilePath=Constants.Container.CONTAINER_CONFIG_DIRECTORY + "/" + schemaNameToBeUsed+ ClusterXML.CLUSTER_XML_FILE_SUFFIX;
  schemaInputStream=getResourceStream(schemaFilePath);
  if (schemaInputStream != null) {
    if (_logger.isLoggable(Level.INFO)) {
      _logger.info("Loaded the cluster XML < " + getResourceURL(schemaNameToBeUsed) + " > for the cluster config setup.");
    }
    return schemaInputStream;
  }
 else {
    String defaultSchemaFileName=Constants.Container.CONTAINER_CONFIG_DIRECTORY + "/" + Constants.Schemas.DEFAULT_SCHEMA+ ClusterXML.CLUSTER_XML_FILE_SUFFIX;
    schemaInputStream=getResourceStream(defaultSchemaFileName);
    if (schemaInputStream != null) {
      if (_logger.isLoggable(Level.WARNING)) {
        _logger.warning("Could not find the cluster xml file: " + schemaFilePath + ".\n Loaded the default cluster xml < "+ getResourceURL(defaultSchemaFileName)+ " > for the cluster config setup.");
      }
      return schemaInputStream;
    }
 else {
      if (_logger.isLoggable(Level.WARNING)) {
        _logger.warning("The requested cluster xml file does not exist in the following path: " + defaultSchemaFileName);
      }
    }
  }
  return schemaInputStream;
}

static public InputStream findClusterXML ( String _clusterXML ) { String schemaNameToBeUsed = _clusterXML ; InputStream schemaInputStream ; String schemaFilePath = Constants . Container . CONTAINER_CONFIG_DIRECTORY + "/" + schemaNameToBeUsed + ClusterXML . CLUSTER_XML_FILE_SUFFIX ; schemaInputStream = getResourceStream ( schemaFilePath ) ; if ( schemaInputStream != null ) { if ( _logger . isLoggable ( Level . INFO ) ) { _logger . info ( "Loaded the cluster XML < " + getResourceURL ( schemaNameToBeUsed ) + " > for the cluster config setup." ) ; } return schemaInputStream ; } else { String defaultSchemaFileName = Constants . Container . CONTAINER_CONFIG_DIRECTORY + "/" + Constants . Schemas . DEFAULT_SCHEMA + ClusterXML . CLUSTER_XML_FILE_SUFFIX ; schemaInputStream = getResourceStream ( defaultSchemaFileName ) ; if ( schemaInputStream != null ) { if ( _logger . isLoggable ( Level . WARNING ) ) { _logger . warning ( "Could not find the cluster xml file: " + schemaFilePath + ".\n Loaded the default cluster xml < " + getResourceURL ( defaultSchemaFileName ) + " > for the cluster config setup." ) ; } return schemaInputStream ; } else { if ( _logger . isLoggable ( Level . WARNING ) ) { _logger . warning ( "The requested cluster xml file does not exist in the following path: " + defaultSchemaFileName ) ; } } } return schemaInputStream ; }
look for the requested cluster xml file in the resourcebundle ( classpath ) under < ee home dir > / config / < reqested_schema_name > - cluster . xml . if it does no find it in the disk ( the default ) it looks for it in the jspaces . jar , in same path . if the requested schema file does not exist in the disk config / schemas dir . . in this case , do we load the default schema file which always exist in the resource under the path config / default - cluster . xml . note that the < com . gs . home > must be part of the classpath , in this case .
