tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cocorossello <>
Subject JtaEntityManager GC
Date Wed, 07 Feb 2018 15:44:25 GMT

We are having some memory problems in our applications. We are using tomee
7.0.4 with eclipselink, no second cache level. Most of the application are

Transaction is managed by container (JTA), no extended transactions at all,
everything we do with persistence is through the entity manager, which is
always injected with:
    @PersistenceContext(unitName = "travelcPU")
    private EntityManager entityManager;

I have isolated one production server, and waited until all sessions are
dead and then flushed all caches and then I took a heapdump. It's still
1.6Gb, even with no information, I think it's quite big.

I can see in the heapdump some 22K
org.apache.openejb.persistence.JtaEntityManager . And then (And I'm not sure
if it's related to JtaEntityManager)  a lot of QueryBasedValueHolder which
are in fact holding references to a lot of our domain objects.

So, my question is, shouldn't those JtaEntityManager be cleared on GC? I
think that they don't hold references to the eclipselink EnityManager, so
the problem probably comes from another part, but can you confirm?

Thanks in advance.

Sent from:

View raw message