In the class AbstractSession, the method importXML has this line:
ContentHandler handler =
getImportContentHandler(parentAbsPath, uuidBehavior);
I am supposed to wrap this ContentHandler object right?
Currently it's returning ImportHandler object. I need to write a similar
handler, where I take care of the 1000 node count in the endElement method.
Am I on the right track?
(Apologies, this is the first time I am making such changes to the code, so
just wanted to make sure I am atleast on the right path)
Thanks,
Sridhar
On Feb 7, 2008 6:20 PM, Marcel Reutegger <[EMAIL PROTECTED]> wrote:
> Sridhar Raman wrote:
> >> yes, most probably. Because Jackrabbit stores any pending modification
> in
> >> memory, the heap is probably used up and the GC runs very often in your
> >> import.
> >> try saving after 1000 nodes.
> >>
> >
> > How do I go about doing this? I import 20000 nodes in one go, and these
> > elements are all same-level children of a node (let's call it
> BooksNode).
> > Currently, I am doing a BooksNode.save() that results in the long commit
> > time. How do I actually split this save into groups of 1000 nodes?
>
> if you implement a wrapper around the ContentHandler returned by
> Session.getImportContentHandler() you can call session.save() whenever you
> count
> 1000 nodes that went through the content handler.
>
> regards
> marcel
>