jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matej Knopp" <matej.kn...@gmail.com>
Subject Re: Transient workspace#clone alternative
Date Tue, 13 May 2008 07:36:38 GMT
On Tue, May 13, 2008 at 8:08 AM, Tobias Bocanegra
<tobias.bocanegra@day.com> wrote:
> hi,
> 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.
Any chance of this being addressed in JCR 2.0? I think this really is
a flaw and it doesn't have any easy workarounds.

>  >  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.
If i could simply export node in one workspace and import in another i
would do that with Workspace#clone. Problem is, that I can't, because
the node has dependencies. Creating simple XML snippet for the node to
preserve UUID could work (thanks for the tip), unfortunately that
won't help me with duplicating the binary content.

>  --
>  toby

Resizable and reorderable grid components.

View raw message