jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: question about xpath on not saved nodes
Date Mon, 30 Nov 2009 11:44:00 GMT
On Fri, Nov 27, 2009 at 20:54, Luiz Fernando Teston
<feu.teston@caravelatech.com> wrote:
> I was thinking it should be possible because of this:
> http://www.day.com/specs/jcr/1.0/8.1.3_Save_vs._Commit.html

As it is stated there:

"Within a transaction, changes made by save (or other,
workspace-direct, methods) are transactionalized and are only
persisted and published (made visible to other sessions), upon commit
of the transaction."

Thus persistence (incl. search index update) happens only upon commit
in the context of transactions.

> I have the following scenario: I work on a software which parses a lot of
> data and store its resulted metadata on jcr. The stored metadata is very
> complex and we need to do some complex search during a massive data
> inclusion. This search should see everything that was already included on
> this session, but it should not reflect in the "saved data" until it
> finishes.

Why not use the content model for that, eg. have a temporary "import"
or "staging" folder that you import stuff into, set the metadata, save
it and then run searches on top of it to integrate it with the rest of
your content (or whatever you need to do here). You can copy it over
to the real, active content tree later, eg. through one or more moves.
If the data-accessing part of your application only looks at the
active content tree, you still have proper transactional separation.


Alexander Klimetschek

View raw message