List managed entities for a given entity manager



Is there a way to find the number of managed entities given an entity manager?

My application has some memory leaks - I am doing clear() on the entity manager(s) but may be I forgot some - so if there is a way to know how many entities are managed by each my entity mgr - it would be helpful.




There is no such method, but if there was it would return 0 after clear anyway.

Consider producing and checking a heap dump (e.g. using VisualVM).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login