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

Invoke @PreDestroy on ViewScoped ManagedBeans upon session expiration #905

Closed
glassfishrobot opened this Issue Nov 2, 2010 · 14 comments

Comments

Projects
None yet
2 participants
@glassfishrobot
Copy link

glassfishrobot commented Nov 2, 2010

When session expiration occurs it would be nice if the @PreDestroy of ViewScoped
ManagedBeans gets invoked.

https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1839

Environment

Operating System: All
Platform: All

Affected Versions

[2.0]

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Nov 2, 2010

Reported by jack_van_ooststroom

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Nov 2, 2010

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Nov 3, 2010

@edburns said:
triage

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Oct 24, 2012

ssilvert said:
Hi Ed,

Do you think this will be fixed in 2.2? I'm seeing more complaints about it.

Stan

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Oct 24, 2012

@edburns said:
I can commit to making sure it works for the new javax.faces.flow.ViewScoped managed beans, which is based on CDI.

I will also investigate what it will take to make it work for the non-CDI based ones as well.

Thanks for bringing my attention to it.

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Oct 24, 2012

@edburns said:
testcase showing problem

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Oct 25, 2012

@edburns said:
This one is proving very tricky due to the many points in time and different scenarios where sessions can be invalidated. The fix for this must be very closely scrutinized, and, more importantly, must pass all the automated tests.

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Oct 25, 2012

@edburns said:
Mojarra changes.

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Oct 26, 2012

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Oct 26, 2012

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Oct 26, 2012

ssilvert said:
We're also getting reports of memory leaks with view-scoped beans. I've verified the leak, but not traced its exact cause. I'm assuming that the leak is related to this issue.

Any opinion on that or insight into how the instances are referenced? I'm assuming that if view-scoped beans aren't eligible for GC when the session ends then they must be tied to application scope or to a ThreadLocal. Any other possibilities?

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Oct 26, 2012

@edburns said:
See JAVASERVERFACES-2561 for implementation.

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented Oct 26, 2012

Marked as fixed on Friday, October 26th 2012, 8:15:56 am

@glassfishrobot

This comment has been minimized.

Copy link

glassfishrobot commented May 5, 2017

This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-905

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment