cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <>
Subject When can cached objects be garbage-collected?
Date Mon, 23 Nov 2009 15:19:52 GMT
Hi everyone,

I'm facing the following situation:

RecipientSet has many Recipients

A large number of Recipient objects are imported in a single 
transaction. The changes are committed e.g. every 100 recipients. 
Nevertheless the Recipient objects are kept in the heap, and eventually 
an OutOfMemoryError occurs.

I have the feeling that the Recipient objects cannot be 
garbage-collected because of the relationship references from the 
RecipientSet. I didn't find any other references to the Recipient objects.

Is it possible to tell Cayenne not to keep the references, or is there 
any other way to handle this issue? Do I have to create a new data 
context after the changes are committed, starting with a fresh RecipientSet?

Thanks a lot in advance for any hints!

Best regards,

Andreas Hartmann, CTO
BeCompany GmbH
Tel.: +41 (0) 43 818 57 01

View raw message