Nested ObjectContext or something else?

2009-11-23 Thread Joe Baldwin
I have a problem with a custom logging class created for use with my JSP's. I am using a factory method from my custom Java class to create log entries via a Cayenne entity. The factory methods create a log entry and immediately commit changes to the ThreadObjectContext. This works fine, exc

Re: When can cached objects be garbage-collected?

2009-11-23 Thread Andreas Hartmann
Hi Michael, Michael Gentry schrieb: You can try dataContext.unregisterObjects() or dataContext.invalidateObjects() if you need to keep other things in your DC around. If not, throwing away the DC for a new one is a good approach. DataContext.invalidateObjects() seems to have the desired effec

Re: When can cached objects be garbage-collected?

2009-11-23 Thread Juergen Saar
If they have to be in one transaction ... there is no way for garbage collection. I had the same problem some time ago and had to fight the OutOfMemoryException. The Container for the Objects and the transaction ist the DataContext. I splitted the Import into slices of about 10.000 Object. For ev

Re: When can cached objects be garbage-collected?

2009-11-23 Thread Michael Gentry
You can try dataContext.unregisterObjects() or dataContext.invalidateObjects() if you need to keep other things in your DC around. If not, throwing away the DC for a new one is a good approach. mrg On Mon, Nov 23, 2009 at 10:19 AM, Andreas Hartmann wrote: > Hi everyone, > > I'm facing the follo

When can cached objects be garbage-collected?

2009-11-23 Thread Andreas Hartmann
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 OutOfMem

Re: composition

2009-11-23 Thread Andrus Adamchik
Hi Domenico, Cayenne 3.0B1 has something called Embeddables (a blue "E" button in the Modeler). This is fairly recent addition, so there's no docs yet, but feel free to try it and ask questions on this list if you have any. Cheers, Andrus On Nov 23, 2009, at 1:22 PM, esis_co...@libero.it w

composition

2009-11-23 Thread esis_co...@libero.it
Hi guys, Has cayenne a native support for composition? For example, in the case of one row represents multiple objects , and some objects won't have their own identity.( value type objects ) Perhaps i always have to map composition as a one-to-one association? Domenico