I'm trying to figure out the best/easiest way to parse this config and
create the requisite object structures in memory. I'm trying to balance
simplicity and glassfish compatibility. It'd be nice to use something
like what glassfish uses (which seems to be hk2 based) but that code is
insanely complex and I'm not sure grizzly would really gain that much
from it. It *would* make it simpler for glassfish to simply pass those
objects off to grizzly config at runtime, though. Another options is
use SAX to just build them up as the document streams by. Relatively
simple but does require that we build up some supporting code to manage
xrefs between config components and the like. We'd probably end up with
a (hopefully) less complex system than glassfish uses but might still
end up a little convoluted. And there's also JAXB which would at least
deal with parsing the XML into an object structure we could walk
through. This would still need the same "back end" processing that a
SAX based solution would end up probably.
What I'm trying to avoid is overengineering this thing to death but
still provide a fair bit of power and flexibility as configuration
elements come and go. It also needs to meld relatively painless into
glassfish's configuration routines as well. Any suggestions?