Hi Jarek, yes, the intent is for the module builders to get updated
deployment plan so that Tomcat, Jetty, etc.... will do the resource lookups
with JNDI just like they do currently. There has been some discussions on
the devlist (started by Sachin) as to whether we want or should accommodate
annotations for Geronimo-specific deployment descriptors. I'm not exactly
sure where it was left off, but I think the agreement was to only
accommodate the JEE5 annotations (e..g, resource-ref in your example below)
at least in the 2.0 timeframe. Thanks.
Jarek Gawor wrote:
Tim,
A couple of questions on the design/implementation:
1) Since the module builders will get an updated deployment
descriptors, in general, the annotation processors in Tomcat, Jetty,
Web services, EJB, etc. will just need to lookup the resources in
JNDI, right?
2) One thing I'm unclear of is how we are going to deal with the
geronimo-*.xml deployment descriptors? For example, if a service wants
to access the system data source it needs to provide the following
information (in geronimo-web.xml file):
<web-app>
....
<dependencies>
<dependency>
<groupId>org.apache.geronimo.configs</groupId>
<artifactId>system-database</artifactId>
</dependency>
</dependencies>
....
<resource-ref>
<ref-name>jdbc/MyDataSource</ref-name>
<resource-link>SystemDatasource</resource-link>
</resource-ref>
</web-app>
I think the annotation.mappedName can be used for the resource-ref
info but what about the dependency? Will user still need to provide
that or Geronimo will attempt to figure it out somehow?
Thanks,
Jarek
On 1/17/07, Tim McConnell <[EMAIL PROTECTED]> wrote:
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
--
Thanks,
Tim McConnell