Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » Migration from EJB 2.1 to EJB 3.0
Migration from EJB 2.1 to EJB 3.0 [message #985398] Thu, 15 November 2012 11:14 Go to next message
Andreas Brieg is currently offline Andreas BriegFriend
Messages: 48
Registered: November 2012
I'm thinking about using MoDisco to migrate an enterprise application from EJB 2.1 to EJB 3.0.

I already had a look on MoDisco and ATL and already have written a small ATL transformation and gone through the MoDisco modernization cycle with that (discovery - transformation - generation). I stumbled across a few bugs, but they aren't of such a great concern to me.

What I'm really concerned about is the size such a transformation would have. I wonder if ATL has the capabilities to maintain larger transformation. Although ATL has the concept of modules, there are a few problems with them

  • helpers with no context are qualified with thisModule even if they are in a library
  • there can be name clashes between different modules

So my question is: How did/do you keep your ATL modules maintainable?

Also I would like to know what experiences you made for an EJB 2.1 to EJB 3.0 migration, if you have such.

Thanks for any responses.
Re: Migration from EJB 2.1 to EJB 3.0 [message #986162 is a reply to message #985398] Mon, 19 November 2012 09:22 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member

Thanks for this very interesting feedback on your practical use case.

From what I understood, it looks more like a model-to-model transformation and ATL discussion rather than a MoDisco related issue.
I think this post would be more appropriate onto the ATL forum.

Anyway we do have already developed some "big" ATL transformations, notably when handling large metamodels such as UML2 or Java for instance.
Module management in ATL is not perfect, but still there is a mechanism called superimposition that allows to do quite a lot of interesting things:
This is the current way to split your transformation into several different ATL files, I hope this is somehow (partially) answering to your needs.


Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
Re: Migration from EJB 2.1 to EJB 3.0 [message #986891 is a reply to message #986162] Thu, 22 November 2012 09:42 Go to previous message
Andreas Brieg is currently offline Andreas BriegFriend
Messages: 48
Registered: November 2012
Thanks for the advice on superimposition. However I think the number of helpers will exceed the number of rules by some magnitudes in such a transformation. So I'm more concerned about helpers. I did an example transformation that transforms java code looking like this:
public void foo(Bar bar) {
    if(bar == null) {
        throw new IllegalArgumentException("bar must not be null");
    // other statements here ...

into this:
public void foo(@NotNull Bar bar) {
    // other statements here ...

This uses more than 40 helpers to serve only 3 rules. I extracted as much rules as I could, which only deal with the java model itself in a generic way. However there are still about 20 helpers only concerned with that specific transformation.
What I'm struggling mostly with is that I'm missing something like helper objects. For example in the example above I'm looking for an If statement that contains a special kind of expression. So I would like to have a helper that takes a helper as an argument. That helper is used to evaluate the if statement expression. That would make things more generic. But this might be out of scope for the ATL language.

I'm asking specifically in this forum, because I would like to read about experiences other people have on this topic.
Previous Topic:How to Load JavaModel (file.javaxmi)
Next Topic:Querying KDM model
Goto Forum:

Current Time: Thu Nov 26 19:02:37 GMT 2020

Powered by FUDForum. Page generated in 0.01966 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top