Affects Version/s: 0.9.6
Fix Version/s: None
Environment:Operating System: Windows XP
Number of attachments :
When using Castor to process data in a long read only batch process the fetched
objects are all stored in TransactionContext._readOnlyObjects. This hash table
is not cleared until the end of the transaction. So there may arise problems
running out of heap memory.
Well, one way to overcome this would be to use shorter transactions. But I
think it's better to provide a simple additional method to disable usage of the
read-only-objects hash table. It avoids reconnecting to the database very
frequently and increases the performance of the batch process.
Attached patch implements the new function Database.setRememberReadOnlyObjects
() to deactivate the read only hash.