Thanks. I will start rewriting the design with all those elements included.
Thanks a lot for your help on this

nicolas

On 5/27/06, Stefan Guggisberg <[EMAIL PROTECTED]> wrote:

On 5/26/06, Nicolas Toper <[EMAIL PROTECTED]> wrote:
> 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
> Workspace.getNamespaceRegistry().getUris).
>
> With the following pseudocode
>
> String[] prefix = myWorkspace.getNamespaceRegistry().getPrefixes()
> String[] uri = myWorkspace.getNamespaceRegistry().getUris()
>
> Is  prefix[0] the prefix for uri[0]?

no, yu can't make any assumptions about the order. you'll have to
get all prefixes and and for each prefix get the associated namespace uri
(or vice cersa).

>
>
>
> - 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.

you shouldn't use the dump method. it's for internal debugging
pruposes only and
he output format may change at any time. keep in mind that the node types
have
global scope i.e. not per workspace. you could e.g. use or borrow code
from
jackrabbit's internal xml node type serialization format
(NodeTypeWriter & NodeTypeReader).

cheers
stefan

>
> Nicolas
>
> On 5/26/06, Tobias Bocanegra <[EMAIL PROTECTED]> 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
> > --
> > -----------------------------------------< [EMAIL PROTECTED]>---
> > 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>---
> >
>
>
>
> --
> a+
> nico
> My blog! http://www.deviant-abstraction.net !!
>
>




--
a+
Nico
my blog! http://www.deviant-abstraction.net !!

Reply via email to