jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Waschkowski" <mwaschkow...@gmail.com>
Subject difference between xpath searches
Date Tue, 26 Jun 2007 18:21:27 GMT

I have noticed a difference between the below two methods for doing an xpath

1) session.getRootNode().getNode(xPath);
2) Workspace ws = session.getWorkspace();
    QueryManager qm = ws.getQueryManager();
    Query q = qm.createQuery(xpath, Query.XPATH);
    NodeIterator iter = q.execute().getNodes();
    return iter;

In search #2, the session must be saved before the query will see newly
added nodes within the given session, but in search #1, the results WILL
include newly added nodes within the given session.

The database corollary would be seeing newly added rows within a particular
transaction, so it seems odd to me that search #2 wouldn't see newly added
nodes within the given session. Can anyone enlighten me as to why this is?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message