Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 41646 invoked from network); 4 Aug 2009 20:23:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Aug 2009 20:23:15 -0000 Received: (qmail 33293 invoked by uid 500); 4 Aug 2009 20:23:19 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 33231 invoked by uid 500); 4 Aug 2009 20:23:19 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 33220 invoked by uid 99); 4 Aug 2009 20:23:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2009 20:23:19 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of costin@gmail.com designates 209.85.212.176 as permitted sender) Received: from [209.85.212.176] (HELO mail-vw0-f176.google.com) (209.85.212.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2009 20:23:08 +0000 Received: by vws6 with SMTP id 6so1490572vws.12 for ; Tue, 04 Aug 2009 13:22:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=HEIzI4+6NDZcTR9VVaZo4IGPAKfGX0RrfhAP7NY95Rc=; b=vIepvnwVpUpcB3/sxqUUD9qjDsHhNerHcP0kJwTUENRtFR5fjiP0BqpMJRKWP8yDBm h+0eFf1w44eATT0oA7/i9lRuXggKiJj6hb3JVOqcLnFJ5Pfq5DTnVAJcnbyIN+EtoNQy MjvDBSP2zGtqGUDrDCB/iWO/1OwxJCRKkzKgg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Ce22BFnFjpgWYRzjucL/bicvlWouRwCpxmCF/GeDvAGMhs5D0X98YkfhD1Q/Z1F8uY 5lFrl3REnm9J263j5E+El9nr59iqT0wWi8boVSnPi5fREguh5CBJJbfvDpchUWaklBEV UrxkDyac70kiPZJsYyrTnMKhCtTBhM4PT/d4U= MIME-Version: 1.0 Received: by 10.220.100.16 with SMTP id w16mr7183927vcn.110.1249417366976; Tue, 04 Aug 2009 13:22:46 -0700 (PDT) In-Reply-To: References: <96e4b5230908041111ib733c81k58a1487f2df84c19@mail.gmail.com> Date: Tue, 4 Aug 2009 13:22:46 -0700 Message-ID: <96e4b5230908041322r8ca9053ha415376ee6e5ede1@mail.gmail.com> Subject: Re: 3.0 annotations ? From: Costin Manolache To: Tomcat Developers List Content-Type: multipart/alternative; boundary=0016e64715d455b9e5047056a65a X-Virus-Checked: Checked by ClamAV on apache.org --0016e64715d455b9e5047056a65a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 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-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > > --0016e64715d455b9e5047056a65a--