Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327834

Summary: Memory leak in AbstractJSFAppConfigManager
Product: [WebTools] Java Server Faces Reporter: Carlin Rogers <carlin.rogers>
Component: JSF ToolsAssignee: Carlin Rogers <carlin.rogers>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gerry.kessler
Version: 3.2.2   
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch to override destroy()
none
patch to override destroy() and avoid getting disposed model none

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.