[jboss-as7-dev] Metadata for AS

Andrew Lee Rubinger andrew.rubinger at redhat.com
Mon Feb 21 14:22:43 EST 2011


Alongside our metadata discussions this morning, I'd like to offer up a 
prototype for use as the preferred metadata view for AS subsystems.

We've baked in the testing community a project currently branded 
"ShrinkWrap Descriptors":

GitHub: https://github.com/shrinkwrap/descriptors
JIRA: https://issues.jboss.org/browse/SHRINKDESC

The end user view looks a bit like:
https://gist.github.com/828591

The purpose of the project is to define an object model for 
specification and JBoss-specific metadata, with the following driving 
tenets:

* No compile dependencies outside the JDK
* Pluggable backends (ie. DOM, XB, Stax, right now we use DOM and 
straight hardcoded parsing logic)
* Easy import/export to/from File/URL/String/Stream/bytes

Other concerns are to be addressed at another level, namely:

* Merging
* Annotation scanning repo output > object model view
* Validation
* ...basically anything initiated during deployment.

Deployment logic should be, IMO:

Deployer takes in deployment > Gen object model > calls outside layers 
for merging/validation/etc > deployer installs final view

The descriptors project is currently immature and could use a jumpstart 
off the prototype. If we decide this is of interest to AS and 
subsystems, that's enough of a demand for me to take it on exclusively 
over the next few weeks to give us a cleaner, faster alternative to 
jboss-metadata, which has in my opinion, the following drawbacks:

* The API *is* the backing model
* Too many dependencies
* Mixes in business logic (defaulting of values, spec validation)
* Not interface-based (resulting in wrapper classes and the like to tack 
on functionality)

S,
ALR



More information about the jboss-as7-dev mailing list