Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 0.9.6
-
Fix Version/s: None
-
Component/s: JDO
-
Labels:None
-
Environment:Operating System: Windows XP
Platform: PC
-
Bugzilla Id:1892
-
Number of attachments :
Description
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.
Created an attachment (id=943)
proposed patch