Announcing EJBGen the EJB 2.0 code generator

Discussions

News: Announcing EJBGen the EJB 2.0 code generator

  1. Announcing EJBGen the EJB 2.0 code generator (19 messages)

    EJBGen is an EJB 2.0 code generator written by Cedric Beust, one of BEA's top developers of the Weblogic EJB 2.0 container. EJBGen allows the developer to write only the Bean class with special Java Doc tags. EJBGen can then parse the EJBean class and generate the remote and home interfaces and deployment descriptor. Cool tool!

    Visit the EJBGen homepage.

    Threaded Messages (19)

  2. I downloaded EJBGen and AccountBean &CustomerBean
    when i run "javadoc ...... AccountBean.java" (as specified),
    i'm getting following exception. Can u help me?


    Constructing Javadoc information...
    [EJBGen] : Adding primkey-field accountId
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Assertion violated ]
    ...etc

    thanks
  3. sir
     what is the latest version of web logic
    is it free downloadable ? how many mb
      is EJB free downloadable ? how many mb?
    pl explain me from where can i get these things
    sincerely
    sudhes kumar
  4. hi palaniswamy u can always remove sir and u can use hi or dear friend
    the latest version of weblogic is 6.o
    it is freely downloadable from
    www.weblogic.com
    it will be aroud 40 mb
  5. The latest version of weblogic is v.6
    But not many people have used it and openions are not
    published. V.5.1 works well
    the download size is 40mb
    you will have to download the docs seperatly
    which is around 14mb
  6. The above mentioned ejb code generators required you to code the bean class first. There is another ejb code generator call ejbx. EJBX is a Java based EJB 2.0 CMP Entity Bean Code Generator. The EJBX can provide a fast development toolkit for developer to generate Enterprise JavaBean 2.0 object based on the existing database, just by one simple command. This is to reduce unnecessary typo error and human mistake to generate EJB code to run on any EJB 2.0 CMP compliant servers.
  7. This looks very similar to a doclet plugin created some time ago by Rickard Oberg, one of the main developers on the open source jBoss project. His version is called EJBDoclet, and is located here -> http://www.dreambean.com/ejbdoclet.html

    I have used this tool with great success in speeding up development cycles on CMP beans especially.
  8. Yes-,
    Rickard Oberg was the first to develop EJBDoclet
    with exactly that kind of idea some while ago.
    Combined with ANT, EJBDoclet makes wonders!
    He recently released it as OpenSource which can
    be found at http://sourceforge.net/projects/ejbdoclet/.
    I beleive his version also cover ordinary JavaBeans (BeanInfo classes, etc ...). We will use this utility as part of a killer project called "webwork" (www.sourceforge.net/projects/webwork)
    to make a splash very soon! Stay tunned!


    PS: What would be the next opensource project that "BEA's top developers" will invent?
  9. PS: What would be the next opensource project that "BEA's top developers" will invent?


       I don't think thats fair. :) I reported on Rickard Oberg's EJBDoclet a while back, its only fair to report on other products as well. Besides, we don't know how long Cedric Beust had been working on EJBGen, they could have developed it in parallel.

       What is important is that these tools exist, and I congragulate both Rickard and Cedric for being nice enough to publish them for free.

    Floyd
  10. There is nothing wrong with taking
    someone's open source code/ideas.
    But it is really nice if you contribute back source code!
    Anyway, I rember IBM released some similar alpha-work
    which was very specific to their WebSphere server ...
    In general, such utilities are much more useful
    compared to GUI wizards/UML design tools ...
  11. If you look at the "credits"
     section on the EJBGen page, you'll see that Rickard Oberg is given credit for coming up with the original idea.
  12. Yes, Rickard deserves it!
    Now the question is if we can get the source code,
    so we can make it work with the Orion & JBoss server
    and fix possible bugs. The distribution comes only
    with source code for the examples ...
  13. Rickard here. Yes, EJBGen is a rip-off of EJBDoclet, yes it's openly stated it's a rip-off (see credits), and yes, only EJBDoclet comes with full source.

    The (main) reason EJBGen is not OpenSource is that Cedric is a BEA guy. Fair enough. EJBGen currently gives you WebLogic descriptors, hence giving you a tool that WL developers can use to create a full application with just EJBGen.

    EJBDoclet OTOH does not generate JBoss.xml. Why not? Well, two reasons mainly. One, JBoss does such a decent job without jboss.xml (by using defaults) that it's not that necessary to have one in the first place, and two, I didn't have time to write the code for it.

    That said, I can play the rip-off game too. :-) There's nothing preventing me (or anyone else, hey EJBDoclet is an open SourceForge-hosted project) from adding support for both WebLogic, JBoss, and NameYourFaveServer, and in fact it has been "in the pipeline" for a long time to do so.

    Also, the fact that EJBDoclet is an OpenSource project makes it immensely more valuable to developers. Why? Because the code it generates is what *I* have decided is best. Don't like it? GREAT! Change it! EJBDoclet has been designed to be customizable, with hooks for adding more generated files, easy subclassing, and (best of all) easily changed code templates for the output.

    But why take my word for it. Check it out yourself:
    http://www.sourceforge.net/projects/ejbdoclet

    /Rickard
  14. The distribution will include the source code soon, but there are still basic functionalities that I would like to add before I tag this tool "1.0". It's still an alpha release at this point.

    --
    Cedric
  15. To be fair, I didn't develop EJBGen in parallel with Rickard's ejbdoclet. I definitely reused his idea, which itself came from the Javaworld article published in August 2000 (right, Rickard?). Nothing wrong with reusing ideas as long as credits are given, right?

    EJBGen goes one step further by allowing you to generate a complete EJB which can then be immediately deployed on WebLogic 6.0.

    You are welcome to ignore the two WebLogic specific files and reuse all the others to deploy your EJB on another container.

    Oh and by the way, Rickard and I get along fine, thank you very much :-)

    --
    Cedric
  16. Yes, EJBDoclet was definitely inspired by the JW article (and I did thank the article author for it).

    I'm not quite sure what you mean with "generate a complete EJB" though. The way EJBDoclet works is that it allow people to develop an EJB 2.0 EntityBean, and then an EJB 1.1 subclass is generated which can then be deployed in any current EJB 1.1 server. Is that what you refer to? Does EJBGen do something similar?

    Or is EJBGen EJB 2.0 only? And what about session beans/message driven beans? Are they supported?
  17. EJBGen is EJB 2.0 only, and yes, it supports CMP Entity, Session (stateful and stateless) and Message-Driven Beans.

    --
    Cedric
  18. Thanks Cedric & Rickard :-)
    Now that we're gonna have both generators in SOURCE(!),
    I'm sure that will benefit the J2EE community a lot!
    Do you believe that both utilities can be merged?
    Also, I think the place for such a extensible generator utility is in the J2EE reference distribution itself, which Sun ships. Does anybody know if Sun folks are doing it? Another useful utility would be a "checker" for the correctness of WAR and EAR bundles with "deep" checking features. Something like that shipped with the latest J2EE, but was not very stable ...
  19. I would like to know if the generated files are specific to Weblogic or can they be used with another server. I am going to try it out I get a chance, but would like to pre-empt this effort if it does not.

    Thank you.

    Monte Morast
    monte.morast@calebtech.com
  20. EJBGen generates two WebLogic-specific files (weblogic-ejb-jar.xml and weblogic-cmp-rdbms-jar.xml), but all the others are 100% EJB vendor neutral, and can therefore be reused in any EJB 2.0 container.

    --
    Cedric