XML & Web services: XML TO EJB

  1. XML TO EJB (3 messages)

    Is there somebody in the block that have worked in direct translation of high level bean specification using tags (like XML or HTML tags) to Enterprise Java Beans?

    I have worked a little in the codification of EJBs. I found that most of the task is repetitive and boring, so I think that work can be expedited by using programmable tags inside a kind of XML or HTML file, and then that file is submmited to and processed by a server that returns EJB Java code.

    I can imagine the following example:

    <EJB:CONTAINER name="vineta">
     <EJB:SESSION_STATEFULL name="VinetaService" jndiHome="modcat.VinetaService">
    <PARAM name="sesion" type="Sesion"/>
          <PARAM name="vinetaKey" type="VinetaKey"/>
          <PARAM name="vinetaKey" type="VinetaKey"/>
          <PARAM name="idRuta" type="String"/>
          <PARAM name="vinetaKey" type="VinetaKey"/>
        <ATTRIBUTE name="sesion", type="Sesion"/>
           this.sesion = sesion;

    Threaded Messages (3)

  2. XML TO EJB[ Go to top ]

    Have you looked at the DTD for the deployment descriptors? Why not simply use this as a model.

    Also note that the ":" is a reserved character in XML due to XML name spaces.

    Dave Wolf
    Internet Applications Division
  3. XML TO EJB[ Go to top ]

    You may want to take a look at EJBGEN (BEA specific) and EjbDoclet, which goes the opposite way - they generate deployment descriptors, home interfaces and remote interfaces from special JavaDoc tags in the bean implementation.

    You can find a discussion of them by searching here.

    Or see

    Granted, you still have to write get- and set-methods, but at least you don't have to write them more than once.
  4. XML TO EJB[ Go to top ]

    Refer http://www.alphaworks.ibm.com/tech/ejbmaker for IBM WebSphere's EJBMaker tool.

    "The EJBMaker is a tool for EJB developers writing applications for the WebSphere application server environment. The tool automatically generates source for CMP entity beans from a bean descriptor file written in XML, plus scripts used to create the required bean persistence tables in DB2.

    Some of the features include the ability to specify relationships between beans, and being able to quickly initialize a bean or extracts data from a bean using XML. Source files are not overwritten unless changed, making the tool ideally suited for execution within a build environment."