The parsing of the *-ds.xml file is not trivial as the format has been butchered through
the years to include things that probably should have never been allowed and no one ever
seemed to draw a line in the sand to make people stop.
Using AOP for the parsing of the *-ds.xml format would seem to make some sense for a few
reasons
a) Element name definitions can be injected into the parsing aspects rather than being
hardcoded. By element name defintions, I mean the actual mapping of things like
<min-pool-size>, <driver-class>. Anyway you look at it, the elements from the
DTD have to be mapped somehow, someway to something.
Before you say it, I know that this can be done via simple MC injection or can simply be
thrown it in a properties file for reference, but this just doesn't seem to me to be
the best approach. I could be wrong.
b)As new elements get added to the *-ds.xml (see above), new aspects can just be added to
support this. Also, new file formats can be accomodated via aspects since there would be
no real behavior in the actual class itself.
anonymous wrote :
| The correct approach is
| xml -> metadata model
| metadata model -> components (jmx/pojo)
|
Right, and as long as the appropriate MetaData gets generated from the *-ds.xml, I
don't see there being a *wrong* approach. Ideally I would have liked to use some form
of DataBinding to do the unmarshalling rather than doing the parsing by hand. However, I
wanted to keep my dependencies to a minimum as well as put an end (at least in my stuff)
to the JAXB, JBossXB debate which never did seem to get resolved.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022475#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...