Question regarding EJB3, code generation and reverse engingeering


#1

For several years I’ve used AndroMDA to generate application structures from UML, first EJB2, then hibernate and lately EJB3. I’ve been looking for alternative for a while, with the following characteristics:

  • Ability to generate EJB3 entity and session beans from UML model
  • Support for Seam
  • Support editing of generated files, i.e. implement operations etc.
  • Ability to reverse engineer changes made to method names, parameters, attributes and annotations to the model.

I found your product and did some tests. I have existing entity beans with JPA annotations on class and attributes. I used the instant reverse to get these to an UML class diagram. However, I don’t know if I did it wrong because I got the following result:

  • All associations between entities becomes two single-direction associations
  • The import was able to get the @Entity annotation, but not others like @Id, @NamedQuery etc
  • If I generate code from this model it’s very different. All getters&setters throw exception for unimplemented method and code for other methods has been lost.

That was as far as I got in this try. Is my usecase supposed to work?


#2

Hi Sverker,

Thanks for your post. To generate EJB code, please run Java round-trip engineering (supported in VP-UML/SDE Professional Edition and DB-VA Java/Professional Edition). Please let me know if there is anything I can do to help.

By the way, Instant Generator is one-off engineering so it will overwrite all existing code every time you run it. Running Java round-trip engineering will update changed from models to code (or vice versa) only.

Best regards,
Lilian Wong