Update on metadata progress
adrian.brock Oct 13, 2006 10:07 AMThis is going a lot slower than I expected, I've not got very far
into the problem despite working on it all week (including
a couple of all nighters :-)
It is very laborious work. At least, I've got a parser that
can parse javaee_5.xsd, ejb-jar_2_1.xsd and ejb-jar_3.0.xsd
and I can prove it works for all element (well except the webservices stuff. ;-)
I'm basically in stage 2 of the following roadmap with
(1) still incomplete for the jboss.xml stuff.
1) Create a new set of more rational metadata classes
that can be shared by javaee based deployers.
2) Map the old the metadata classes as a facade over these
classes.
3) Rework the EJB2.1 deployer to use new metadata
and expose the old metadata via the container
for backwards compatibility (meaning the
only part of the container I need to rewrite is the getBeanMetaData()
hooks).
4) Rework the metadata classes to share the same model
as the javaee/ejb3 annotations allowing the org.jboss.metadata hierarchy
to provide the mixing/overriding of class annotations and deployment/instance metadata (the model from 1)
This will give hardwired deployment, class, instance contexts.
5) Deal with the metadata collection merging for things like
resource-refs.
6) Plugin Bill's injector stuff, as discussed elsewhere.
(Actually the current stuff is wrong, since it only copes with
one injection target per Ref)
7) Properly plugin in the metadata repository such that the
metadata hierarchy is extensible and configurable.
8) Write the code to expose the metadata context(s) via
the ManagedObject abstraction to the profile service.
Both the combined runtime view and the individual contexts.
It was originally (8) that got me started on this, but trying to
write a mapping for all the JavaEE metadata when
* each deployer does it differently
* the details needed are embedded in an arbitrary metadata object
* there are even different models for EJB2 and EJB3
But, with this approach, it will just be a case of creating the ManagedObject
from the annotations/metadata of the metadata context,
a much simpler task. Obviously, it is not quite that simple, but
at least it will be a tractable problem. :-)
There's also further steps:
9) Do this for the other JavaEE deployers (rar, war, car, ejb3, etc.)
10) Work out how to expose the managed object model for JMX and MC
Issues still to work out:
* What Bill is talking about when he says annotation fail as a
metadata model
* Which parts of the model should be promoted to annotations
* The merging/hiding issue
* A simple mechansim to populate deployment vs instance metadata
e.g. assembly-descriptor stuff can be generic to the deployment
or ejb specific