Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-117

Add and deploy does not fail if runtimeName already exists

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.0.0.Alpha1
    • None
    • OSGi, Server
    • None

    Description

      The ServerDeploymentHelper has this code

          public String deploy(String runtimeName, InputStream input) throws ServerDeploymentException {
              ServerDeploymentActionResult actionResult;
              try {
                  DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
                  builder = builder.add(runtimeName, input).andDeploy();
                  DeploymentPlan plan = builder.build();
                  DeploymentAction action = builder.getLastAction();
                  Future<ServerDeploymentPlanResult> future = deploymentManager.execute(plan);
                  ServerDeploymentPlanResult planResult = future.get();
                  actionResult = planResult.getDeploymentActionResult(action.getId());
              } catch (Exception ex) {
                  throw new ServerDeploymentException(ex);
              }
              if (actionResult.getDeploymentException() != null)
                  throw new ServerDeploymentException(actionResult);
              return runtimeName;
          }
      

      which does not fail if the runtimeName already exists

      There is a debug log like this

      11:11:25,103 DEBUG [org.jboss.as.controller.management-operation] (pool-4-thread-1) JBAS014616: Operation ("add") failed - address: ([("deployment" => "v200.jar")]) - failure description: "JBAS014803: Duplicate resource [(\"deployment\" => \"v200.jar\")]"
      

      Attachments

        Issue Links

          Activity

            People

              tdiesler@redhat.com Thomas Diesler
              tdiesler@redhat.com Thomas Diesler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: