-
Notifications
You must be signed in to change notification settings - Fork 92
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
ProxyFactory#getProxy seems to re-use EVM instances from the cache without properly settings optionalParameters #1805
Comments
…intain evm references in proxies
…intain evm references in proxies
…intain evm references in proxies
@EugenMayer would you be able to try if the changes in #1806 solve this? |
@Mobe91 thank you a lot for working on this item! Will try to queue the test today |
@Mobe91 indeed this solves my issue entirely. Did it solve your memory leak issue too? |
Unfortunately not, there must be other things going on in my case that are probably not related to blaze-persistence 🥲 Glad to hear that it works for you! @beikov will make sure it goes into the upcoming release. |
@Mobe91 AFAIK you are using spring boot in your tests right? Some aspects we use:
We use this for all JPA based tests. |
Thank you for the hints. If you are curious, I've opened a spring-boot issue a while ago for this and included quite some details about what I am observing in my case. Reducing the application context cache size was the first thing I did but strangely the application contexts are still not garbage collected even though they are no longer held by the cache. My tests run in Maven but no parallelism is involved. I might give the EM clearing a try though! 👍 |
…intain evm references in proxies
Assuming that one uses
entityViewConfiguration.addOptionalParameters
to insert default parameters for an EVM to carry (specifically beans on needs to use during Pre/Post remove listeners), it seems that during the invocation attempt for thus listeners, and EVM instance is created viacontext.getEntityViewManager().getSerializableDelegate(view.$$_getEntityViewClass())
which ultimately will use the
ProxyFactory
to create or *reuse an EVM.When an EVM is "reused" it is not ensured, that this EVM has the optionalParameters applied and thus we can end up having an EVM without those parameters included.
The text was updated successfully, but these errors were encountered: