[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Full Identity Map that has relationships to objects cached in weaker types
|
JPA may change the picture (I think not), but 1-1 relations are either a direct reference or some subtype of ValueHolder and 1-N are typically just the given collection type. So in all cases, unless the ValueHolder or collection themselves use weak references internally, you effectively have a hard reference in place between the (hard cached) object and the object it references, which would prevent GC of the latter. And I'm not aware that EclipseLink has any ValueHolder or collections of that sort.
That said, whether this is actually a problem or not would depend on the size of the FullIdentityMap cache (most objects may be cycled out of that cache anyway), cardinality of the relation, etc. Typically though you'd only use full identify maps for things like referentials (e.g. say products) and the more transactional data (e.g. say, orders) wold be in the weaker maps, and the references would be from transactional data to referentials, not vice-versa (e.g. orders lines point to products but not vice-versa).
Cheers,
Jason