There is an out of memory issue about PCRegistry memory leak when using MetaDataRepository preloading.This issue has been fixed in OpenJPA community. Please refer the jira https://issues.apache.org/jira/browse/OpenJPA-1670
When using MetaDataRepository preloading the MetaDataRepository is registered twice as a RegisterClassListener with the PCRegistry but both registrations aren't removed when the EMF is closed. The heapdump file shows that org.apache.openjpa.enhance.PCRegistry has consumed over 80% of Java heap.
Resolving the problem
To fix this issue, please follow the instruction.
1. Download the patch.PCRegistryMemoryLeak.zip
2. Unzip the attached file into the WebSphere Application Server Community Edition installation directory, and ensure the files listed in the zip file to replace the ones in the server installation directory.
3. Start the server, for example,