Skip to content
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

@PreDestroy method on View Scoped beans are never called #4

Closed
MaikelNait opened this issue Sep 9, 2016 · 5 comments
Closed

@PreDestroy method on View Scoped beans are never called #4

MaikelNait opened this issue Sep 9, 2016 · 5 comments

Comments

@MaikelNait
Copy link

It seems, when using a custom Spring scope to handle the JSF View Scoped beans, as in your project, their @PreDestroy method is never called, and therefore we may have a memory leak here.

Even more, the ViewScope.valueUnbound() or ViewScope.remove(), or even the ViewScopeViewMapListener.doCallback() are never called.

How to verify that the ViewScoped beans are really removed from the scope when navigating to a new View ???

@rumatoest
Copy link
Contributor

Will check and response later

@giquieu
Copy link

giquieu commented Dec 12, 2016

I noticed that the Beans are removed to change pages or to expire the session. Is that correct?

@rumatoest
Copy link
Contributor

@giquieu Do you know how JSF view beans scope should work?

@giquieu
Copy link

giquieu commented Dec 12, 2016

@rumatoest I do not know much for sure ... I'm learning ...
I just noticed in my project that annotating a Bean with @scope ("view") @PreDestroy is only called when I make a redirect or the session expires.
And I do not know if this is normal.
Would you have any easy-to-understand material on the JSF Bean lifecycle?

@rumatoest
Copy link
Contributor

@giquieu
I'm not providing any manual or tutorial for JSF. Before using my plugin you must know what JSF is and how does it work.

BTW @MaikelNait We've done some tests. And looks like this methods are called eventually, but it depends on particular JSF implementation. They are actually not called when you are expecting them to be called :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants