eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
160 stars 109 forks source link

Static variables in ELUtils cause memory leaks and leaks of resolver cache between applications #5461

Closed OndroMih closed 1 week ago

OndroMih commented 1 month ago

Describe the bug

When Mojarra is used in an application server, its classes are loaded by the app server's classloader and are shared by all deployed applications. This can lead to at least to serious issues:

To Reproduce

The memory leak can be reproduced as discussed in https://github.com/jakartaee/expression-language/issues/214

Expected behavior

Each application that is deployed on an application server uses its own set of resolvers. Doesn't share them with other applications.

OndroMih commented 1 month ago

A fix for the 4.1 version is here: https://github.com/eclipse-ee4j/mojarra/pull/5462 Should be also backported to 4.0 so that Jakarta EE 10 app servers like GlassFish can include the fix.

I cannot build the current master branch. I assume it's not buildable because it depends on a new snapshot Faces version. So I didn't raise the PR for the master branch.