[jboss-jira] [JBoss JIRA] (AS7-6938) Add and deploy does not fail if runtimeName already exists

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Thu Apr 18 05:22:54 EDT 2013


     [ https://issues.jboss.org/browse/AS7-6938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Diesler updated AS7-6938:
--------------------------------

    Description: 
The ServerDeploymentHelper has this code

{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;
    }
{code}

which does not fail if the runtimeName already exists

There is a debug log like this

{code}
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\")]"
{code}

  was:
The ServerDeploymentHelper has this code

{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;
    }
{code}

which does not fail if the runtimeName already exists


    
> Add and deploy does not fail if runtimeName already exists
> ----------------------------------------------------------
>
>                 Key: AS7-6938
>                 URL: https://issues.jboss.org/browse/AS7-6938
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Server
>            Reporter: Thomas Diesler
>            Assignee: Jason Greene
>             Fix For: 8.0.0.Alpha1
>
>
> The ServerDeploymentHelper has this code
> {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;
>     }
> {code}
> which does not fail if the runtimeName already exists
> There is a debug log like this
> {code}
> 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\")]"
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list