Menu

UML2EJB

Help
2002-11-14
2002-11-15
  • Hema Venkataraman

    I downloaded the above tool and ran the sample provided and was successful in generating source after doing the workaround for JAXB.

    Then I tried with ArgoUML's zargo. It did not throw any error. But did not create any sources. I will attach the .zargo file in my bug report.

    I also tried with the XMI file created using Rational Rose XMI Add In for Rose Model and it throws lot of errors. I will attach the errors.log file and the rose xmi file.

    Please do help me as to what should be done to make your tool work with XMI created by ArgoUML and Rose.

    Should I change the stylesheet accordingly? Please advise.

    Thanks in advance.

    Hema Venkataraman

     
    • Matthias Bohlen

      Matthias Bohlen - 2002-11-14

      Hi Hema,

      currently, I am travelling. I'll return home tomorrow and will have time to look at the model. I do not think that the stylesheet has to be changed, however. Must be something in the model.

      Cheers...
      Matthias

       
    • Hema Venkataraman

      Hi,

      Thanks for responding to my bug report. The Models were created by Argo and XMI by reverse engineering the Java files and some additions were done and the .xmi created.

      Say for example, you have java/j2ee source and you have used one of the UML modelling tools to reverse engineer and you further model it and create an xmi out of the updated model and I would like to generate source out of it using your tool. How do I do it?

      When I get an XMI file created by Rose or Argo, I would like your tool to generate source code.

      Please advise.

      Thanks

      Hema

       
      • Matthias Bohlen

        Matthias Bohlen - 2002-11-15

        Hi Hema,

        OK, I see. You're in a different situation than the other users who start with a clean model with only one class per bean.

        I would do the following:

        + take the sample model CarRentalSystem.zargo model as a basis - it already contains the required stereotypes such as "EntityBean", "StatelessSessionBean" and "StatefulSessionBean", "ejbref", "exception"
        + delete all classes and diagrams in the sample model
        + reverse-engineer you bean classes only, not the interface classes, into the sample model
        + delete all ejb-related methods in the classes
        + delete all getters and setters
        + keep only attributes and business methods
        + tag each bean class with the proper stereotype
        + add relationships among the entity beans
        + add dependencies with the proper stereotypes <<ejbref>> or <<exception>>

        Finally
        + run UML2EJB to see what works and what does not.

        Hope that helps...
        Matthias

        P.S.: The same applies to Rose with the exception that we do not provide a Rose sample model, yet.

         
        • Matthias Bohlen

          Matthias Bohlen - 2002-11-15

          Hi,

          Sorry, I forgot the rest of the process, after UML2EJB runs successfully for the first time:

          + Move the implementation of your business methods into the UML2EJB-generated *Impl classes.
          + Build with ant and run your JUnit test cases.
          + Run UML2EJB again to see that it does not change anything any more.
          + Build and re-run the tests.

          When you're confident that your configuration is so good that you can re-run the generator after each change in the model, then:

          + Delete your original bean classes and interfaces and continue to work with the new ones.

          Cheers...
          Matthias

           

Log in to post a comment.