[jboss-dev-forums] [Design the new POJO MicroContainer] - Reworking the XML parsing

adrian@jboss.org do-not-reply at jboss.com
Fri May 25 09:32:05 EDT 2007


I've completed the testing of the JBossXB parser using JAXB annotations.

This should remove a lot of code from the MIcrocontainer project, in particular most of
the code that sets up the xml parsing.

It also allows for much cleaner implementations, e.g. the javabean parsing
https://svn.jboss.org/repos/common/jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBean.java
can now be implemented as an annotated factory

The MC xml only requires three additional classes to parse the "simple types"
that don't have property editors (cardinality, controllermode and controllerstate) e.g.
https://svn.jboss.org/repos/common/jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/CardinalityValueAdapter.java
the rest is just annotations, even the polymorphism :-)
https://svn.jboss.org/repos/common/jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ValueMetaData.java

I'd also suggest we reimplement the GenericBeanFactory to be a BeanMetaDataFactory
since it makes the implemetation much cleaner:
https://svn.jboss.org/repos/common/jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/GenericBeanFactoryMetaData.java

Before this can be done, it needs a release of the jbossxb-builder project
and I need to write some docs on how to use the additional annotations
that are JBossXB specific
https://svn.jboss.org/repos/common/jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048680#4048680

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048680



More information about the jboss-dev-forums mailing list