jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Mitterdorfer <daniel.mitterdor...@salzburgresearch.at>
Subject Re: XPath query returns no results
Date Tue, 20 Nov 2007 07:07:43 GMT
Hi Marcel,

I just verified your assumption: You were absolutely right. I was not 
aware that the XPath queries only run against committed results. Because 
my #dump() returned all expected nodes right before I issued the XPath 
query I thought it would also take these nodes into account. Thanks a 
lot to all for your help, especially to you, Marcel!

Bye,

Daniel

Marcel Reutegger wrote:
> Hi Daniel,
>
> ah, now I'm starting to realize what happens. You are using spring 
> modules, which probably wraps a transaction around your code. because 
> queries are only run against *committed* content it may happen that 
> you won't see results even though you saved (but not yet committed) 
> changes. this is somewhat counter intuitive and has been debated on 
> this list a while ago. JSR 283 will be more flexible in this respect.
>
> can you please make sure you commit the transaction before you execute 
> the query? that will probably solve your issue.
>
> regards
>  marcel
>


Mime
View raw message