On Feb 8, 2006, at 11:04 PM, David Blevins wrote:
Also, somewhat unrelated, what do you do for reading in
deployment descriptors? OpenEJB used to use Castor XML, then we
switched to XMLBeans in Geronimo.
I was thinking maybe JAXB2. One of the first steps will be
reading in a persistence.xml so we can pull out the JPA
PersistenceProvider and create those PersistenceUnitInfo thingies.
I'm really more interested in someone getting experience on JAXB2
than reusing the code to marshall a persistence.xml. Specifically,
if it works well I'll want to roll it out instead of xmlbeans for
the other dozen and more deployment descriptors which have four
major versions each as well for our own config files.
So I chatted with Jeff on irc and he dug into creating a plugin for
jaxb that allows you to do code generation like we are doing with
XMLBeans. Getting away from repeated code generation on standard
schemas would be a good thing.
We need something more akin to a standard tree for ejb to hold
deployment descriptor info for each version of ejb 1.1, 2.0, 2.1, and
3.0 deployment descriptors and some way to marshall it. You can do
this with castor with some work, but you're stuck creating the
mapping files for each deployment descriptor version. Good that it's
solvable, but no fun either.
Not sure if there is also a (better?) way to marshal to and from a
non-jaxb specific pojo tree like that in JAXB2. In JAXB1 you had to
inherit from a special object class. Don't know what is doable in
JAXB2.
I'm Cc'ing Bruce and Keith of Castor as they are the local experts I
know of.
Hey Keith, many moons ago I sent a note to the Castor list asking if
it would be possible for you to generate a pojo tree *and* a mapping
file -- rather than a pojo tree and descriptor classes for marshalling.
If we could get that feature we'd be in great shape!!!
-David