-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BeanPropertiesCache + FactoryFinderCache #218
Comments
There are (SPEC-API) integration changes that we would include in the form of a pull request to add the ^ caching classes if there is interest in improving the ^ caching classes. Note that there are public methods to clear the cache for a specified classloader. |
Note that what this does addresses the concern raised in #214. While it's true that if something is gc'd as a result of memory pressure it's not a memory leak (as stated by @markt-asf in #215), in WildFly we prefer not to have deployment classloaders survive undeployment and thus we prefer to clear the cache. That's one of the reasons why we've used our own variant of the EL API for many releases. |
The current We can't use the proposed
I don't see any other differences so I think that is a "no thank you" to using |
I'll note that EL 6.0 was released at the start of this month so any changes being discussed would be for 6.1. |
Tomcat has a similar approach to caching the factory implementation. The key difference is that is uses I'd have no objection to a PR that introduced a |
|
Unfortunately that isn't true. |
That behaviour of |
Thanks @markt-asf and @lprimak -- this discussion is very helpful. |
I think Let me know if I am missing something |
It seems the main issue is in Mojarra holding a reference to the BeanELResolver in a static variable. I believe that should be definitely addressed. In application servers that support app redeployment, no component should use static variables as it can easily introduce leaked classloaders after an app was undeployed. I saw this behavior in Mojarra and I was really suprised about it. |
To address beanProperties and factoryFinder caches, isn't it better to add an SPI to plug in custom caching mechanisms? It would additional dependencies in the API, the API would contain only the necessary functionality and would leave caching to implementations. It would also allow implementers clean the cache if needed, without adding new methods in the API or maintaining forks. |
That's a fantastic idea. Way to think in Jakarta EE-stic ways |
Replaced by #248 |
https://github.com/jboss/jboss-jakarta-el-api_spec/blob/4.0.x/api/src/main/java/org/jboss/el/cache/BeanPropertiesCache.java +
https://github.com/jboss/jboss-jakarta-el-api_spec/blob/4.0.x/api/src/main/java/org/jboss/el/cache/FactoryFinderCache.java have worked well for WildFly/JBoss application servers. We haven't ported these to Expression Language 6.0 yet but could if there is interest in adding those.
Question, should we target adding these changes in 6.0? If no, how about the next release?
The text was updated successfully, but these errors were encountered: