tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Annotation processing - Geronimo injection
Date Fri, 06 Apr 2007 09:03:21 GMT

On Mar 27, 2007, at 8:31 PM, David Jencks wrote:

>> <big snip>
>> Right now, it's mostly pita-win (it's a significant  
>> refactoring) :D You should IMO offer some incentive as part of  
>> this to justify the refactoring, such as support for web.xml  
>> annotation overrides in standalone Tomcat (as you can see, there's  
>> full support for annotations, but not overriding).
>
> i'll look into this... although  I don't see the code involved as  
> being very connected to what I've been proposing.
>

i've worked on this some more and come up with a patch that I feel  
more or less comfortable showing to tomcat :-) at https:// 
issues.apache.org/jira/browse/GERONIMO-3010 or directly https:// 
issues.apache.org/jira/secure/attachment/12355053/GERONIMO-3010-3a.patch

I'm happy to open a bugzilla entry and attach the patch to it as  
well, but I also need to keep the patch tracked in geronimo until  
there's more resolution as to its fate.

This patch features:

-- xml override of annotations.  There's even a manual test via a new  
EnvEntryExample servlet which is present but not entirely integrated  
into the examples webapp.

-- postCreate and preDestroy annotated methods are looked for on all  
superclasses per spec.

-- Improved interface name of InstanceManager rather than  
LifecycleProvider, thanks David Blevins

-- Jasper does not use any Catalina classes, and catalina only uses a  
jasper class if it creates its own InstanceManager: if you supply an  
InstanceManager yourself there is no classes dependency of catalina  
on jasper (although it appears that startup creates a JspServlet in a  
default web app???).   This removes the need for sharing  
org.apache.AnnotationProcessor between catalina and jasper.

-- jasper loads classes more directly, tomcat uses care in figuring  
out if security precautions are needed and which classloader should  
be used.

Some more improvements are possible, for example the jasper generated  
classes are loaded twice.  I'd rather make sure that the current  
state doesn't break a lot of the tck before making a lot more changes.


Comments?

thanks
david jencks



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message