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

Bug 472379

Summary: ServiceInterpreter doesn't dispose JavaExtensionsManager
Product: [Modeling] Sirius Reporter: Esteban DUGUEPEROUX <esteban.dugueperoux>
Component: CoreAssignee: Project inbox <sirius.core-inbox>
Status: CLOSED FIXED QA Contact: Jessy Mallet <jessy.mallet>
Severity: major    
Priority: P3 CC: cedric.brun, jessy.mallet, maxime.porhel, pierre-charles.david
Version: 3.0.0Keywords: triaged
Target Milestone: 3.1.0   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/55514
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=4e64af432005735c97bca4c3a7eeeefb623af0b4
Whiteboard:
Bug Depends on:    
Bug Blocks: 470460    

Description Esteban DUGUEPEROUX CLA 2015-07-10 10:05:09 EDT
I see that ServiceInterpreter doesn't dispose JavaExtensionsManager on session closing. This has effect to have many workspace listeners from WorkspaceClassLoading registered when opening and closing many Sirius sessions.
The AQL interpreter dispose correctly the JavaExtensionsManager through its super class.
Comment 1 Esteban DUGUEPEROUX CLA 2015-07-15 05:37:32 EDT
We have also an instance of JavaExtensionsManager created when validating a odesign with "service:" expression. This comes from MultiLanguagesValidator.getInstance() singleton which is used to validate odesign expression which use a CompoundInterprete to do validation and this last create a ServiceInterpreter. And as JavaExtensionsManager is instantiated on ServiceInterpreter instantiation we get a new workspace listener from WorkspaceClassLoading.
To fix that the JavaExtensionsManager from ServiceInterpreter should be created lazily, i.e. only on service expression evaluation and MultiLanguagesValidator should not be a singleton.
Comment 2 Esteban DUGUEPEROUX CLA 2015-07-15 05:37:41 EDT
We have also an instance of JavaExtensionsManager created when validating a odesign with "service:" expression. This comes from MultiLanguagesValidator.getInstance() singleton which is used to validate odesign expression which use a CompoundInterprete to do validation and this last create a ServiceInterpreter. And as JavaExtensionsManager is instantiated on ServiceInterpreter instantiation we get a new workspace listener from WorkspaceClassLoading.
To fix that the JavaExtensionsManager from ServiceInterpreter should be created lazily, i.e. only on service expression evaluation and MultiLanguagesValidator should not be a singleton.
Comment 3 Eclipse Genie CLA 2015-09-09 03:37:54 EDT
New Gerrit change created: https://git.eclipse.org/r/55514
Comment 4 Cedric Brun CLA 2015-09-09 03:40:09 EDT
(In reply to Eclipse Genie from comment #3)
> New Gerrit change created: https://git.eclipse.org/r/55514

This changeset at least reduce the problem by making sure the extension manager is disposed when the ServiceInterpreter is.
Comment 6 Pierre-Charles David CLA 2015-09-10 04:16:18 EDT
Fixed by 4e64af432005735c97bca4c3a7eeeefb623af0b4.
Comment 7 Jessy Mallet CLA 2015-09-29 05:37:53 EDT
No validation: Technical issue
Comment 8 Pierre-Charles David CLA 2015-10-16 09:11:10 EDT
Available in Sirius 3.1.0.