Alexey Loubyansky wrote:

Ricardo Argüello wrote:

Why not use JAXB, or BEA's XMLBeans?


Perhaps. But I don't have much of experience with JAXB and no at all with XMLBeans. So, maybe you can tell me why?

Because it will generate the complex object model specified in the J2EE Deployment Descriptors, in a very easy way.


For example, it would generate an object to represent <ejb-jar> ... </ejb-jar> from the EJB 2.1 deployment descriptor:

EjbJar ejbJar = EjbJarFactory.readFromFileSystem(deploymentDescriptorFile);
String name = ejbJar.getEjbName();
...

I have made up all this code, but is a good example of what you would expect from a XML/Java binding tool, as JAXB or XMLBeans.
Without having to write XML navigation/marshalling/unmarshalling code. A binding tool will generate all necesary Java files representing what's described in an XML Schema file, including validation.
We will have objets to refer to <web-app> ... </web-app>, <ejb-jar> ... </ejb-jar>, etc. with all complex relations between objets already coded.


And all these automaticaly generated from the official XML Schema files posted by Sun here:
http://java.sun.com/xml/ns/j2ee/


Think XDoclet... but for XML Schema files.... :-)


Since in J2EE 1.4 deployment descriptors are specified in XML Schema, it should be very easy to get an object model from that, using any XML/Java binding tool.


For example...

Sun's JAXB: http://java.sun.com/xml/jaxb/

BEA's XMLBeans:
http://dev2dev.bea.com/technologies/xmlbeans/

XMLBeans is very new, but more flexible than JAXB.
I have experience with JAXB, and none with XMLBeans, but it is basically the same thing...
We could try both and decide later.


Ricardo Argüello


Thanks.



I would be interested in collaborating to code that.


Ricardo Argüello

Alexey Loubyansky wrote:

What are our plans for metadata? I remember various discussions but can we revisit it again? What are the requirements and wishes?

I am facing it right now. I would like to have, say, entity metadata from various sources (ejb-jar.xml, jbossxmp-jdbc.xml) in one place. So, I wrote a very simple frame that reads xml files and constructs the metadata tree. Actually, the metadata tree is built while reading ejb-jar.xml and then populated with other data from jboss.xml and jbosscmp-jdbc.xml.

But I would like to use something common, i.e. server-wide solution if we are going to agree on it.





-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development






-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to