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">
<EJB:INTERFACE>
<EJB:CREATE>
<PARAM name="sesion" type="Sesion"/>
</EJB:CREATE>
<print>
<PARAM name="vinetaKey" type="VinetaKey"/>
</print>
<print>
<PARAM name="vinetaKey" type="VinetaKey"/>
<PARAM name="idRuta" type="String"/>
</print>
<printPermission>
<PARAM name="vinetaKey" type="VinetaKey"/>
<printPermission>
</EJB:INTERFACE>
<EJB:IMPLEMENTATION>
<ATTRIBUTE name="sesion", type="Sesion"/>
<EJB:CREATE>
<EJB:JAVA_CODE>
this.sesion = sesion;
</EJB:JAVA_CODE>
</EJB:CREATE>
</EJB:IMPLEMENTATION>
</EJB:SESSION_STATELESS>
</BEAN_CONTAINER">
-
XML TO EJB (3 messages)
- Posted by: Camilo Vasquez
- Posted on: April 04 2001 19:16 EDT
Threaded Messages (3)
- XML TO EJB by Dave Wolf on April 04 2001 20:01 EDT
- XML TO EJB by Niels Ull Harremoes on April 05 2001 02:51 EDT
- XML TO EJB by srini sam on April 06 2001 23:11 EDT
-
XML TO EJB[ Go to top ]
- Posted by: Dave Wolf
- Posted on: April 04 2001 20:01 EDT
- in response to Camilo Vasquez
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
Sybase
-
XML TO EJB[ Go to top ]
- Posted by: Niels Ull Harremoes
- Posted on: April 05 2001 02:51 EDT
- in response to Camilo Vasquez
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
http://www.beust.com/cedric/ejbgen/
and
http://sourceforge.net/projects/ejbdoclet/
Granted, you still have to write get- and set-methods, but at least you don't have to write them more than once. -
XML TO EJB[ Go to top ]
- Posted by: srini sam
- Posted on: April 06 2001 23:11 EDT
- in response to Niels Ull Harremoes
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."
-Srini...