Thanks - so objectweb instead of BCEL.
I'll try it out - it's a bit different from what I had in mind, it looks
like xbean-finder first finds all classes and
than reads the files using the class loader ( but not Class.forName, which
is good ) and keeps track of all annotations.

I was thinking of a simple File/zip based scanning, without any class loader
- and just select the few
annotations we need and write a web.xml fragment as it goes, without keeping
anything in memory.
I guess in 3.0 a deploy tool / phase is absolutely needed - we can't have
tomcat scan all files
each time it starts up, so the user will have to do something to re-initiate
the scanning. Like touch
web.xml, or run a re-deploy tool.

 I'm curious - why objectweb and not BCEL ?


On Tue, Aug 4, 2009 at 12:50 PM, David Jencks <david_jen...@yahoo.com>wrote:

> We use xbean-finder for this in geronimo/openejb/etc.
>
> http://repo2.maven.org/maven2/org/apache/xbean/xbean-finder/3.5/
>
> https://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-finder
>
> We also have a servlet 3.0 spec jar I've been trying to keep up to date
> with the glassfish javadocs.
>
>
> https://repository.apache.org/content/repositories/snapshots/org/apache/geronimo/specs/geronimo-servlet_3.0_spec/1.0-EA-SNAPSHOT/
>
>
> https://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-servlet_3.0_spec
>
> thanks
> david jencks
>
>
> On Aug 4, 2009, at 11:11 AM, Costin Manolache wrote:
>
>  Hi, anyone working on the @Filter, @Servlet annotation scanner for
>> tomcat-trunk ?
>> If I'm understanding it correctly, tomcat will have to read all files in
>> classes and lib and look for the
>> annotation - and I would guess the only reasonable option is looking at
>> bytecode.
>> I checked BCEL - seems reasonably easy, but if anyone has different code -
>> I
>> would rather reuse it in
>> tomcat-lite :-)
>>
>> BTW - there is a typo in javax.servlet.ServletRegistration - should be
>> Dynamic, not Dynmaic.
>> I can fix it next time I get some free time...
>>
>> Costin
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

Reply via email to