Thank you very much for all the detail answers. Those really help. I just
have a further question about getSize methods on IdentityMap. I tried the
following two methods to get the cache size:
1) size =
((oracle.toplink.essentials.ejb.cmp3.EntityManager)em.getDelegate()).getServerSession().getIdentityMapAccessorInstance().getIdentityMap(MyEntity.class).getSize();
2) size =
((oracle.toplink.essentials.ejb.cmp3.EntityManager)em.getDelegate()).getServerSession().getIdentityMapAccessorInstance().getIdentityMap(MyEntity.class).getSize(MyEntity.class,true);
It looks like only the second one can return the current size of the map and
the first one returns the number of entities used to be in the cache. I have
a glance of the source code and find the first method also "return
cacheKeys.size();". So why the first one does not return the correct size?
Cheers,
Jason
--
View this message in context: http://www.nabble.com/Some-questions-about-HardWeak-SoftWeak-cache-tp17354187p17395701.html
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.