jpos / jPOS

jPOS Project
http://jpos.org
GNU Affero General Public License v3.0
609 stars 461 forks source link

Memory Leak in TransactionManager's redeployed participants #561

Closed ar closed 1 year ago

ar commented 1 year ago

This issue was hot fixed already but it's worth documenting it in case it applies to your TM use case.

The problem was introduced in eb7ba2a0ca28ed2f4480ad079ca98c704edd3001 where we optimize abbreviated names in a Map<TransactionParticipant,String>. Problem this was a static Map and we should have mapped classes instead of instances, but even classes isn't a good idea as they may change when we use Q2's dynamic classloading.

The problem, already fixed in 2.1.9-SNAPSHOT (86950d6e2c2), only shows up when a participant uses a big amount of memory, and gets redeployed often.