I feel that I have stumbled upon a very subtle bug or API misuse on my
side when using SlingAllMethodsServlet. The following is a shortened
version of my code:
@Override
protected void doPost(
SlingHttpServletRequest request,
SlingHttpServletResponse response
) throws ServletException, IOException {
// [...]
Resource resource = request.getResource();
Node node = resource.adaptTo(Node.class);
node.setProperty("x", "y");
node.getSession().save();
// [...]
}
Now, through debugging, I have noticed that the change I made above did
not update Jackrabbit's index. Before I try to write up a reproducible
test case:
1. Is this a known issue?
2. Am I misusing API (e.g. session.save())?
I've noticed that Sling's PostOperation uses ResourceResolver.commit(),
although that doesn't seem to make the difference.
Cheers
Lukas