[jboss-as7-dev] Upload 2 files with the same name fails

Brian Stansberry brian.stansberry at redhat.com
Fri Apr 8 09:48:49 EDT 2011


On 4/8/11 6:07 AM, Heiko W.Rupp wrote:
> Hi,
>
> suppose I have a domain with 2 server groups A and B and two times a foo.war file in version A and B.
> Uploading to the domain works, and I get different hashes back
>
> {"outcome":"success","result":{"BYTES_VALUE":"7jgpMVmynfxpqp8UDleKLmtgbrA="},"compensating-operation":null}
> sha: 7jgpMVmynfxpqp8UDleKLmtgbrA=
>
> ok.
>
> As I understand next step is now to add this to /deploment/test.war:add(hash= .<from above>  , name="test.war")
>
> And here I already have the previous version added, so that new add fails:
>
> Json to send: {"address":[{"deployment":"test.war"}],"operation":"add","hash":{"BYTES_VALUE":"7jgpMVmynfxpqp8UDleKLmtgbrA="},"name":"test.war"}
> java.lang.AssertionError: {"outcome":"failed","result":{"domain-failure-description":[{"java.lang.IllegalStateException":"Resource at address [(\"deployment\" =>  \"test.war\")] already exists"}]}
>
> I think it should be allowed to have multiple files with the same name - especially as the files can be identified via<name,hash>
>

This is what the runtime-name is for. I'm trying to make the hash 
disappear as something the end-user cares about, e.g. the underlying 
/deployment=foo.war:add operation can itself accept the content and 
upload it, thus removing the need for the end user to care about the hash.


-- 
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat



More information about the jboss-as7-dev mailing list