public boolean addJars(String[] jarNames,byte[][] jarBytes,String[] groups){
  boolean success=true;
  try {
    if (groups == null) {
      groups=new String[]{SharedConfiguration.CLUSTER_CONFIG};
    }
    Region<String,Configuration> configRegion=getConfigurationRegion();
    for (    String group : groups) {
      Configuration configuration=configRegion.get(group);
      if (configuration == null) {
        configuration=new Configuration(group);
        writeConfig(configuration);
      }
      configuration.addJarNames(jarNames);
      configRegion.put(group,configuration);
      String groupDir=FilenameUtils.concat(configDirPath,group);
      writeJarFiles(groupDir,jarNames,jarBytes);
    }
  }
 catch (  Exception e) {
    success=false;
    logger.info(e.getMessage(),e);
  }
  return success;
}

public boolean addJars ( String [ ] jarNames , byte [ ] [ ] jarBytes , String [ ] groups ) { boolean success = true ; try { if ( groups == null ) { groups = new String [ ] { SharedConfiguration . CLUSTER_CONFIG } ; } Region < String , Configuration > configRegion = getConfigurationRegion ( ) ; for ( String group : groups ) { Configuration configuration = configRegion . get ( group ) ; if ( configuration == null ) { configuration = new Configuration ( group ) ; writeConfig ( configuration ) ; } configuration . addJarNames ( jarNames ) ; configRegion . put ( group , configuration ) ; String groupDir = FilenameUtils . concat ( configDirPath , group ) ; writeJarFiles ( groupDir , jarNames , jarBytes ) ; } } catch ( Exception e ) { success = false ; logger . info ( e . getMessage ( ) , e ) ; } return success ; }
add jar information into the shared configuration and save the jars in the file system
