Beispiel #1
0
 /**
  * @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;
 }
Beispiel #2
0
 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());
   }
 }