Skip to content

[39.x] WFLY-21390 Fix memory leak of ComponentConfiguration after deployment being retained due to lambdas + Cleanup StatefulSessionBeanCacheProvider SPI following WFLY-21390#19574

Merged
rhusar merged 2 commits intowildfly:39.xfrom
rhusar:WFLY-21390-39.x
Feb 1, 2026

Conversation

@rhusar
Copy link
Member

@rhusar rhusar commented Jan 29, 2026

rhusar and others added 2 commits January 29, 2026 13:07
…nt being retained due to lambdas

ComponentConfiguration objects were being retained after deployment due to lambda expressions capturing entire configuration objects when they only needed specific values.
Since these lambdas were stored in long-lived MSC services (e.g., BinderService), the deployment-time configuration remained in memory indefinitely.

Fix lambda captures in ViewDescription and EjbJndiBindingsDeploymentUnitProcessor
Refactor StatefulSessionBeanCacheProvider SPI to avoid retaining configuration.

Signed-off-by: Radoslav Husar <radosoft@gmail.com>
Resolve StatefulSessionBeanCacheProvider in Phase.POST_MODULE so that any associated services installed during Phase.INSTALL can access EEModuleConfiguration before EECleanup DUP runs (after which EEModuleConfiguration is no longer available).
@wildfly-bot wildfly-bot bot requested review from bstansberry and tadamski January 29, 2026 12:09
@rhusar rhusar added the 39.x WildFly 39 label Jan 29, 2026
@rhusar rhusar self-assigned this Jan 29, 2026
@rhusar rhusar merged commit a0e577f into wildfly:39.x Feb 1, 2026
12 checks passed
@rhusar rhusar deleted the WFLY-21390-39.x branch February 1, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

39.x WildFly 39

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants