Hi, I still think there needs to be a general consensus for the handling of annotations in Geronimo.
So, to better explain this design proposal I've
created a few simple UML diagrams that demonstrates how it might work with one of the Geronimo
builders--i.e. Tomcat.
Here's the link to the URL diagrams:
http://cwiki.apache.org/GMOxDEV/jsr-88-12.html
-- The first is just a diagram of the pertinent high-level use cases for JSR-88
1.2
-- The second is an interaction diagram of deployment at a very high-level as it currently works for
Tomcat
-- The third is the proposed interaction diagram of how deployment will generally flow with
annotations. Namely:
-- Geronimo will find/discover all the annotations in the artifact being deployed prior to
the createModule invocation on the TomcatBuilder
-- Geronimo will then update the deployment descriptor tags in the XML accordingly and then
set the Metadata-Complete tag
-- Finally, during installation of module, Geronimo will invoke Tomcat's
AnnotationProcessor implementation and pass it the array of annotations that have been discovered,
and Tomcat's AnnotationProcessor will handle handle those runtime-type annotations (e.g.,
PreDestory, PostConstruct, etc...) without corresponding deployment descriptor tags. Note also that
Tomcat's AnnotationProcessor handles the resource injection as well.
-- The fourth is just a class diagram (not yet complete) that shows the new
Geronimo annotation classes
Questions:
-- Is this a pattern that can be consistently used for other builders as well like Jetty, Axis,
OpenEJB, Web Services, etc ??
-- Is it reasonable to assume that these other components will have their own AnnotationProcessor
implementation (like Tomcat) that can be invoked by Geronimo during deployment ??
--
Thanks,
Tim McConnell