jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Problems with XPath query - no result
Date Mon, 15 Sep 2008 09:32:44 GMT

On Mon, Sep 15, 2008 at 12:22 PM, Anton Gavazuk <antongavazuk@gmail.com> wrote:
> Sorry everyone for disturbing - Spec is cool source for ideas :)

No problem, sorry for the delayed response. :-) I guess nobody had an
idea what could be wrong with your setup until you mentioned that
you're using transactions...

> As I did everything (node creation and querying) in one transaction so
> even session.save() didnt persist changes in repository.
> But I'm still confused - query engine doesnt look on changes which
> exist only in memory?

Yes, this explains the behavior you're seeing. Jackrabbit only updates
the query index once the changes to the repository are made available
to all clients. And since a transaction prevents other clients to from
seeing your changes until you commit them, neither will the query
index be updated until the transaction is committed.

The JCR spec is intentionally vague on when and how changes in the
repository are reflected in the query index. JSR 283 will explain the
potential behavior better, but still leaves it up to the repository
implementation to decide how to implement the query index.


Jukka Zitting

View raw message