Re: Spec: retainValues + flush()
Hi Craig, does the described scenario make sense? kind regards, Christiaan -- View this message in context: http://www.nabble.com/Spec%3A-retainValues-%2B-flush%28%29-tf4297510.html#a12812855 Sent from the JDO - User mailing list archive at Nabble.com.
Re: Spec: retainValues + flush()
Hi Craig > Slow getting through my email backlog after vacation... I hope you enjoyed it;-) > The explicit evict methods are intended for this kind of memory > management usage. Are there issues with evict for your purposes? The scenario in which I use it, is when creating a large tree-like structure of objects. Once I have a part of this tree created, I doesn't needs to be accessed anymore, so all fields could be cleared (including strong references), in which case all the nodes in the tree can be garbage collected. So I would like to be able to do something like this: after creating so many nodes flush the intermediate results to the datastore and clean up memory, but if something fails the complete creation of the tree should be cancelled. The evict doesn't help out in this scenario: "...If evictAll with no parameters is called, then all persistent-clean instances are evicted (they transition to hollow)..." In the described scenario the already processed nodes are persistent-dirty so they won't become hollow. kind regards, Christiaan -- View this message in context: http://www.nabble.com/Spec%3A-retainValues-%2B-flush%28%29-tf4297510.html#a12383253 Sent from the JDO - User mailing list archive at Nabble.com.
Re: Spec: retainValues + flush()
Hi Christiaan, Slow getting through my email backlog after vacation... On Aug 20, 2007, at 1:48 AM, Christiaan wrote: Hi, I have a question about flush() in combination with retainValues. In the spec it says for retainValues "If this flag is set to false, then eviction of transactional persistent instances takes place at transaction commit." This does not mention flush(), is this done on purpose? Yes, in the sense that retainValues and restoreValues are intended to specify the behavior of instances transitioning between transactions. The reason why I ask is that I was under the impression that flush() can be used to free up resources if possible, for instance when performing a large transaction. It would be beneficial for memory usage if already processed objects would become hollow after flush() is being called. The explicit evict methods are intended for this kind of memory management usage. Are there issues with evict for your purposes? Best regards, Craig kind regards, Christiaan -- View this message in context: http://www.nabble.com/Spec%3A- retainValues-%2B-flush%28%29-tf4297510.html#a12232225 Sent from the JDO - User mailing list archive at Nabble.com. Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp! smime.p7s Description: S/MIME cryptographic signature
Re: Spec: retainValues + flush()
Any thoughts? kind regards, Christiaan -- View this message in context: http://www.nabble.com/Spec%3A-retainValues-%2B-flush%28%29-tf4297510.html#a12370565 Sent from the JDO - User mailing list archive at Nabble.com.
