Hi,

>It would be better if the query engine used the same tree snapshot as
>the rest of the session. There shouldn't be any need to call
>getCurrentRoot().

This is actually what I expected that ContentSession.getCurrentRoot()
would provide me: I expected getCurrentRoot() would always return the same
root until the session has committed or refreshed. It wasn't obvious to me
neither from the method name nor from the javadocs that there is
(potentially) a new current root every time the method is called. Not a
problem, I can change the javadocs and add that info.

But now I see that the ContentSession doesn't in fact know the current
revision and doesn't provide snapshot isolation, how do I use the same
tree snapshot as the rest of the session? Is it the oak-jcr
SessionDelegate.root field? I guess I will have to change the oak-core
query API then, and add the Root as a parameter to the method
SessionQueryEngine.executeQuery?

Regards,
Thomas

Reply via email to