コード例 #1
0
ファイル: EsbHandler.java プロジェクト: snjeza/jbosstools-esb
 /**
  * @param serverDefinition
  * @return
  */
 private static boolean esbExists(RuntimeDefinition runtimeDefinition) {
   JBossESBRuntime[] runtimes = JBossRuntimeManager.getInstance().getRuntimes();
   for (JBossESBRuntime runtime : runtimes) {
     String location = runtime.getHomeDir();
     if (location != null && location.equals(runtimeDefinition.getLocation().getAbsolutePath())) {
       return true;
     }
   }
   return false;
 }
コード例 #2
0
ファイル: EsbHandler.java プロジェクト: snjeza/jbosstools-esb
 public void initializeRuntimes(List<RuntimeDefinition> runtimeDefinitions) {
   for (RuntimeDefinition runtimeDefinition : runtimeDefinitions) {
     String type = runtimeDefinition.getType();
     if (runtimeDefinition.isEnabled() && !esbExists(runtimeDefinition)) {
       if (ESB.equals(type)) {
         JBossESBRuntime runtime = new JBossESBRuntime();
         if (!runtimeDefinition.getName().startsWith(ESB_PREFIX))
           runtime.setName(ESB_PREFIX + runtimeDefinition.getName());
         runtime.setHomeDir(runtimeDefinition.getLocation().getAbsolutePath());
         runtime.setConfiguration(DEFAULT_CONFIGURATION);
         runtime.setVersion(runtimeDefinition.getVersion());
         JBossRuntimeManager.getInstance().addRuntime(runtime);
       }
     }
     initializeRuntimes(runtimeDefinition.getIncludedRuntimeDefinitions());
   }
 }
コード例 #3
0
ファイル: EsbHandler.java プロジェクト: snjeza/jbosstools-esb
 private String getVersion(String location, String configuration) {
   return JBossRuntimeManager.getInstance().getVersion(location, configuration);
 }