Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327834 - Memory leak in AbstractJSFAppConfigManager
Summary: Memory leak in AbstractJSFAppConfigManager
Status: RESOLVED FIXED
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: JSF Tools (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Carlin Rogers CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-14 18:14 EDT by Carlin Rogers CLA
Modified: 2010-10-25 00:19 EDT (History)
1 user (show)

See Also:


Attachments
patch to override destroy() (1.22 KB, patch)
2010-10-14 18:24 EDT, Carlin Rogers CLA
no flags Details | Diff
patch to override destroy() and avoid getting disposed model (3.10 KB, patch)
2010-10-24 19:58 EDT, Carlin Rogers CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlin Rogers CLA 2010-10-14 18:14:35 EDT
The AbstractJSFAppConfigManager, a managed object managed by the JSFAppConfigManagerFactory via the ResourceSingletonObjectManager framework, does not clean up resources when the associated project is deleted. This ends up leaking underlying TypeImpl and Translator objects in the faces config EMF model. Though there is no persistent data to clean up, AbstractJSFAppConfigManager should still override the IManagedObject.destroy() method and clean up resources and memory references.
Comment 1 Carlin Rogers CLA 2010-10-14 18:24:04 EDT
Created attachment 180917 [details]
patch to override destroy()
Comment 2 Carlin Rogers CLA 2010-10-15 11:34:17 EDT
Looks like fixing this exposes an error in the process to stop the ContextParamSpecifiedJSFAppConfigLocater. It tries to get the model but when executing a runnable with the project scheduling rule, a check on the workspace tree lock fails and throws a ResourceException. Will also need to figure out how best to stop the locaters for a project delete.
Comment 3 Carlin Rogers CLA 2010-10-24 19:58:09 EDT
Created attachment 181605 [details]
patch to override destroy() and avoid getting disposed model

new patch that also checks for conditions indicating that the provider model object is not available to avoid errors during dispose.
Comment 4 Carlin Rogers CLA 2010-10-25 00:19:07 EDT
committed patch to HEAD.