jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: Transient workspace#clone alternative
Date Tue, 13 May 2008 06:08:21 GMT
On 5/13/08, Matej Knopp <matej.knopp@gmail.com> wrote:
>  Since workspace#clone works directly on persistent storage it's usage
>  turned out to be very limiting for us. All calls to the #clone methods
>  have to be "self contained" in respect that no nodes can be referenced
>  outside srcAbsPath, otherwise ConstraintViolationException occurs. So
>  if i want to clone two nodes with circular dependencies I'm out of
>  luck, unless i clone parent of those nodes, right?
that is true and maybe is a flaw in the design of this method.

>  So far the only workaround i could think about is to implement own
>  alternative if workspace#clone, but there are several drawbacks.
>   - I'll lose the original UUID
>   - I'll lose history information
>   - I'll duplicate the binary data
>  Am I missing something or is this really the only way to go?
currently there is only 1 way of controlling the UUIDs of newly
created methods, that is by importing sysview. so what you can do is
create a XML snippet or generate sax events that creates your node
with the respective UUID.
for the sake of cloning, you can also export the node in one workspace
and then import in on the other.


View raw message