I'm new to JPA / OpenJPA, and I noticed that if I don't call EntityManager.clear() after I leave the objects, I get OutOfMemoryError (I keep adding new entities to the loop). I'm not sure if this is the expected behavior, or just, and the problem is with OpenJPA 1.2.1.
So, do I need to explicitly separate objects from myself? If I'm not, is that good practice anyway?
java memory-leaks jpa openjpa entitymanager
ecerulm Feb 11 2018-10-11T00 : 00Z
source share