Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.6DR#1, 1.6DR#2, 1.6DR#3
-
Component/s: Sample Apps
-
Labels:None
-
Environment:Browser and OS independent.
-
Affects:Sample App./Tutorial
Description
This issue has been around for a while, but since it was server side related it wasn't really noticeable.
Basically, the ClockBean (which controls the IntervalRenderer for each user) would be created for a new session. The problem is when the user closed their browser, the ClockBean relied on renderingExceptions to clean itself up, which was unreliable and prone to leaving dead threads hanging around, which would cause a gradual memory leak.
Basically, the ClockBean (which controls the IntervalRenderer for each user) would be created for a new session. The problem is when the user closed their browser, the ClockBean relied on renderingExceptions to clean itself up, which was unreliable and prone to leaving dead threads hanging around, which would cause a gradual memory leak.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
With the addition of a ViewListener class and a tie in to the PersistentFacesState, it was possible to reliably clean up the ClockBean for each user.
The ClockBean now implements ViewListener and the associated viewCreated and viewDisposed methods. In viewDisposed the IntervalRenderer for the session will be stopped, the renderable bean removed, and then disposed. This proper cleanup when a user closes their browser will stop the gradual server side memory leak.