For me it looks as if the result of Property.getStream()-data is buffered in the session workspace. I can bypass the problem by dropping the old and establishing a new session, but this isn't very fast. Isn't it possible to get rid of buffered data? I tried Session.refresh(true) and Session.refresh(false), but that didn't help.
Any help will be welcome.
In the meantime I discussed this problem in the jackrabbit-forum. It obviously comes from a bug in the jackrabbit implementation. I have created a jira-ticket and will open a daycare-ticket as well.
For the problem I've now a technical explanation. I will add this here to have the thread complete:
When running the code
Node contentNode = ntfileNode.getNode("jcr:content"); Property jcrdata = contentNode.getProperty("jcr:data"); Binary fileBin = jcrdata.getBinary();
the methode getBinary() creates a tempfile, obviously with the attribute "deleteOnExit" - because it's gone not before, but when the program exits. When traversing the repository this can become a real lot of data. There is no means provided by the JCR 2.0-API to get knowledge of the tempfiles name nor to delete it. To overcome this problem I've established a supervising class to track the tmpdir and supply methods to identify and remove the superflous files.