jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Toper" <nto...@gmail.com>
Subject Re: Google Summer of Code project for Jackrabbit
Date Fri, 26 May 2006 15:25:34 GMT
Hi Tobias,

Thanks for your feedback.

About the issue on jcr.Lock, if we do as you all suggested, I think I can
simply ignore them since I will be sure no transaction would be committed to
the PM while backuping. I will reconciliate later the PM with the changelogs
committed in between. Would this work fine?

- what about inter-workspace operations?
What do you mean please?

- how do you backup the versions?
My initial idea is to fetch them all for each node and copy them in the
backup workspace (as in the ExamplesPages in the wiki). I was thinking of
adding a protected method to the Node object: setVersionHistory. It would be
accessible by JR "system" layer application. Is this idea good?

It seems the more maintenable since I would be only in the application layer
of the versioning framework.

Do you think I should work directly at the persistence layer storage? I
assumed the code would run faster but we would put more maintenance effort
in it.

- how do you backup the namespaces?
I will simply store in the backup workspace all namespaces (since I will put
only one workspace at a time in the backup one, I will simply use
Workspace.getNamespaceRegistry().getPrefixes() and

With the following pseudocode

String[] prefix = myWorkspace.getNamespaceRegistry().getPrefixes()
String[] uri = myWorkspace.getNamespaceRegistry().getUris()

Is  prefix[0] the prefix for uri[0]?

- how do you backup the nodetypes?
One idea would be to use the dump method of the NodeTypeManager but it seems
kind of inelegant. Instead I think I would use getAllNodeTypes and iterate
on it to add them to the backup workspace.


On 5/26/06, Tobias Bocanegra <tobias.bocanegra@day.com> wrote:
> > There are two kinds of lock: the jcr.Lock and the
> > EDU.oswego.cs.dl.util.concurrent.*. The two are somewhat
> > not related. Am I correct?
> not at all. the locks i mentioned where jcr locks.
> > There are no issues with jcr.Lock (we can still read a node).
> there is one. the locks you need are 'deep locks'. i.e. the locks the
> node and the entire subtree. but you can only accquire a lock, if no
> one else locked a node. so you would not be able to bakckup until all
> locks are released. which may not be suiteable.
> other questions:
> - what about inter-workspace operations?
> - how do you backup the versions?
> - how do you backup the namespaces?
> - how do you backup the nodetypes?
> regards, toby
> --
> -----------------------------------------< tobias.bocanegra@day.com >---
> Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
> T +41 61 226 98 98, F +41 61 226 98 97
> -----------------------------------------------< http://www.day.com >---

My blog! http://www.deviant-abstraction.net !!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message