Community
Participate
Working Groups
We have problem with heap memory. In heap dump we can see that 40% of memory is used by org.eclipse.persistence.internal.helper.IdentityWeakHashMap. We call org.eclipse.persistence.sdo.helper.jaxb.JAXBHelperContext (methods wrap and unwrap) from our code. IdentityWeakHashMap is growing in memory all the time till OutOfMemoryException occurrence or server restart. Our architecture: We work with SDO objects in our system so we need to use JAXBHelperContext for transformations from / to POJO. Object of JAXBHelperContext is implemented as instance variable in Singleton class - so there is only one instance of JAXBHelperContext in our system. We were expecting that GC will be able to delete unneeded instances from IdentityWeakHashMap but according to our performance tests this is not happening. We do not do anything special in persistence logic - just return data or store data - so we do not keep references on objects - we use local scope (objects exists only inside the method). We tried to change implementation and remove JAXBHelperContext from singleton, after that there was not problem with heap anymore. But it has negative impact on our architecture (performance). We use Websphere Application Server v7.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink