Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2m-atl-dev] ATL 3.0 architecture & ASMEMFModel Memory leak comes back to haunt?

Hello,

Thanks a lot for your work!
I just had a remark about the .ecore files into the emf4atl driver. There are ever several "resources directories" in ATL, so we finally need to choose one. Actually we have:
1) org.eclipse.m2m.atl
2) org.eclipse.m2m.atl.dsls
3) org.eclipse.m2m.atl.drivers.emf4atl

2) and 3) are problematic because as these plugins contains TCS parsing tools, they depends on the RegularVM. So org.eclipse.m2m.atl.core.emf (for example) can't refer the embedded ecore files without depending RegularVM... 1) depends on nothing, so it's easy to for any plugin to refer it (e.g. emf4atl, org.eclipse.m2m.atl.core.emf). This plugin could be improved like org.eclipse.m2m.atl.dsls to provide utilities for retrieving resources.

Best regards,
William

Dennis Wagelaar a écrit :
The ATL_Dynamic_ResourceSet branch is now merged.

I've also attached a snapshot of my ATL ant tasks fork based on the dynamic ModelLoader architecture. It may come in handy when you plan to port the ant tasks to the new architecture.

--
Dennis

William Piers schreef:
I commited the patch, so you can work on it.

William

Dennis Wagelaar a écrit :
Hello William, ATL devs,

First of all, thanks for the quick answer! I put my reply at the bottom:

On 12 Dec 2008, at 15:28, William Piers wrote:
Hello Dennis,

Answers below:
Dennis Wagelaar a écrit :
*snip*
I encountered this problem too... so I add an option to clear the resourceSet after each transformation run. It's definitely not the better solution...

What are your opinions on this? William: what do you think of an architecture change that involves something like a ModelLoader?
I agree with your demonstration. A solution could be to make the EMFModelFactory "dynamic": * in CoreService, no more registry for it, but a "createModelFactory(String modelFactoryName)" method.
* in the EMFModelFactory, a non-static ResourceSet.
So the EMFModelFactory is transparently linked with its ResourceSet instance, and is recreated for each launch. Note that a programmatic launch (or another launching tool, like ant) can provide the same behaviour as before is necessary, by keeping the same factory into chained transformation.

Would you agree with that? I tested an implementation and attached a patch to this mail if you want to see details.

Thank you for your feedback!

William

I agree with this idea, thanks! As far as I'm concerned, you may commit this change to CVS, after which I can work in the extra changes w.r.t. the finalize() methods and wrapping the updated ASM-based plugins. It's important to get this one right as soon as possible, regarding the global impact that these changes have ;-).

Cheers,
Dennis
------------------------------------------------------------------------

_______________________________________________
m2m-atl-dev mailing list
m2m-atl-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2m-atl-dev

begin:vcard
fn:William Piers
n:Piers;William
org:Obeo
adr:2 rue Robert Schumann;;lot 24;NANTES;;44408;France
email;internet:william.piers@xxxxxxx
title:MDA Consultant
tel;work:+33 (0)2 51 13 51 82
tel;cell:+33 (0)6 20 31 75 98
url:http://www.obeo.fr
version:2.1
end:vcard


Back to the top