[
https://issues.apache.org/jira/browse/TOMEE-4560?focusedWorklogId=998262&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-998262
]
ASF GitHub Bot logged work on TOMEE-4560:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 30/Dec/25 16:06
Start Date: 30/Dec/25 16:06
Worklog Time Spent: 10m
Work Description: kartiksirigeri opened a new pull request, #2408:
URL: https://github.com/apache/tomee/pull/2408
Proxy handler does not remove the stateful EJB3 from the liveregistry on
invocation of @Remove annotated method. Check is added to identify invocation
of @Remove annotated method of stateful EJB3.
Issue Time Tracking
-------------------
Worklog Id: (was: 998262)
Remaining Estimate: 0h
Time Spent: 10m
> Memory leak for EJB3 stateful bean
> ----------------------------------
>
> Key: TOMEE-4560
> URL: https://issues.apache.org/jira/browse/TOMEE-4560
> Project: TomEE
> Issue Type: Bug
> Components: TomEE Core Server
> Affects Versions: 8.0.16
> Reporter: Kartik Sirigeri
> Priority: Major
> Attachments: EjbProxyHandler_EJB2.png, EjbProxyHandler_EJB3.png,
> test_project.zip
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The bean references are not getting removed from
> ProxyRegistry.liveHandleRegistry map when the the method annotated wtih
> '@Remove' annotation for EJB3 stateful bean is invoked. While the call for
> remove method on EJB2 stateful beans removes the entry from
> ProxyRegistry.liveHandleRegistry map immmediately. It seems the
> EjbObjectProxyHandler._invoke method checks for EJB_OBJECT, EJB_LOCAL type
> along with the operation type, this check fails for EJB3 beans and the beans
> are not removed from the ProxyRegistry.liveHandleRegistry map unless any
> business methods are invoked which would invaldiate the map due to
> InvalidateReferenceException. This causes a memory leak unless any business
> method is called after the invocation of @Remove method in EJB3.
>
> Snapshot of the debug flow attached along with the test code
--
This message was sent by Atlassian Jira
(v8.20.10#820010)