Tools for converting Database DDL into XML and Into EJB beans

Discussions

EJB programming & troubleshooting: Tools for converting Database DDL into XML and Into EJB beans

  1. All,
       With arrival of EJB 2.0, it's now possible to have fine grained Beans. So I am wondering if there are tools for

    1. Converting a Database scripts (such as DDL) into a XML maping file. XML mapping file is similar to EJB deployment file. It basically maps the logic name used by EJB to the phyiscal column name of the table.

    2. generating EJB Java files from XML mapping files.

    WebObjects (not EJB) can generate Java files from it's EOmodeler based on the EOModel (.plist file).

    I hope there are tools for outhere doing the same thing.

    Thanks.


    Chester Chen
    chester dot chen at webwarecorp dot com


  2. JBuilder generates entity beans for a table using the database directly. It generates all the Java classes and deployment descriptors needed for the webserver.

    I have used JBuilder 4.0 to generates entity beans for Oracle. It was for EJB 1.1 spec. Check the latest version of JBuilder to generate EJB 2.0.

    You can also think of writing a Java class to generate the code if you can not get the required product for you. We had successfully written a small Java class to connect to Oracle database and create the entity bean class for a given table (2 days of effort). We then used EJBGen tool to generate the home and remote interface and the XML deployment files for Weblogic server.

    Satish
  3. We had successfully written a small Java class to connect >to Oracle database and create the entity bean class for a >given table (2 days of effort). We then used EJBGen tool >to generate the home and remote interface and the XML >deployment files for Weblogic server.


    Thanks for the reply.

    I am a bit confused here. If yoyu already have the entity bean, why do you need to generate Home and Remote Interaface again ?

    With my limited understanding, I thought the EJBGen is generating EJB and Deployment files using JAVA DOC tags.

    Am I missing something here ?