Bug 1050014 - Cannot deploy bundle to EAP domain mode

Le 03/07/2014 17:54, Libor Zoubek a écrit :
> In
> modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java:
>
>> +        Operation addDeploymentStep = new Operation("add", "deployment", contentUploader.getRuntimeName());
>> +        List<Object> addDeploymentContentProperty = new ArrayList<Object>(1);
>> +        Map<String, Object> contentValues = new HashMap<String, Object>();
>> +        contentValues.put("hash", new PROPERTY_VALUE("BYTES_VALUE", contentUploader.getHash()));
>> +        addDeploymentContentProperty.add(contentValues);
>> +        addDeploymentStep.addAdditionalProperty("content", addDeploymentContentProperty);
>> +        addDeploymentStep.addAdditionalProperty("name", contentUploader.getFilename());
>> +        addDeploymentStep.addAdditionalProperty("runtime-name", contentUploader.getRuntimeName());
>> +
>> +        Operation deployStep = new Operation("deploy", addDeploymentStep.getAddress());
>> +
>> +        CompositeOperation compositeOperation = new CompositeOperation();
>> +        compositeOperation.addStep(addDeploymentStep);
>> +        compositeOperation.addStep(deployStep);
>> +
>> +        Result result = getASConnection().execute(compositeOperation, 300);
>
> I think this code would fail (with JBAS014803: Duplicate resource) in
> case deployment already existed on AS7 server (which is what happens
> when you deployed version 1 of your bundle with handedover deployment
> and afterwards you deploy version 2 of same deployment file name but
> different content)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/rhq-project/rhq/pull/55/files#r14521650>.
>

I though I had tested this. Will try again.