Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 35651 invoked from network); 25 Jan 2010 18:32:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jan 2010 18:32:12 -0000 Received: (qmail 64559 invoked by uid 500); 25 Jan 2010 18:32:12 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 64469 invoked by uid 500); 25 Jan 2010 18:32:12 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 64461 invoked by uid 99); 25 Jan 2010 18:32:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jan 2010 18:32:12 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.136.44.63] (HELO smtp108.prem.mail.sp1.yahoo.com) (98.136.44.63) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 25 Jan 2010 18:32:05 +0000 Received: (qmail 53393 invoked from network); 25 Jan 2010 18:31:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer; b=1rMrlTsRO60L3rjSgfjQGOr3+T64nsXVLOBk7Vzdvw6WKbZam7P8PNHXEUP0AXckz2E8mXybAk23kxVrVHN8exs8YSGvTw9P5AP3ksgWpB4p9MxcblS5lYaPPoxa3PmdzmdJCcjW3wfUlNPAUZ7ZVeju6a8DlHYcp6xdO0IzwQs= ; Received: from 076-076-148-215.pdx.net (david_jencks@76.76.148.215 with plain) by smtp108.prem.mail.sp1.yahoo.com with SMTP; 25 Jan 2010 10:31:43 -0800 PST X-Yahoo-SMTP: .9oIUzyswBANsYgUm_5uPui0skTnzGJXJQ-- X-YMail-OSG: f5u9pL8VM1lD.JWLHAF1wxydEXSf3_5BKqCk0U0npHgqHKIDq2.xk.67_ByLcDBzlFnMvHMuoiSmVtT35Oz79q9GQG_oMwUs0VP6lxbc.Ft3odstLDY0cGTav4GzMBkE7t2uEhvDg.ACQZggJeJSLIKXYjFOneCmycKQGtDC4uQsg.ynWiGSYbv4gDGdbVNfc4Xm55bJsZgxKIocFO2tCb6sZ6JJ__UlP8.owPQNImTZM3.KHq2Skg3SPS4fyGOFUqcPadJCPh55Ey73z.yUORhFiOufabg3FJyI X-Yahoo-Newman-Property: ymail-3 Message-Id: <53FAE742-BE39-4A73-9BB1-527CD9F45E8C@yahoo.com> From: David Jencks To: dev@geronimo.apache.org In-Reply-To: <45f744e41001250720l592d99b3m986245403a4e76df@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: Web Annotation and web fragment support in Geronimo 3.0 Date: Mon, 25 Jan 2010 10:31:41 -0800 References: <45f744e41001250720l592d99b3m986245403a4e76df@mail.gmail.com> X-Mailer: Apple Mail (2.936) On Jan 25, 2010, at 7:20 AM, Ivan wrote: > Hi, > Recently, I am looking at the annoation and web fragment in > Servlet 3.0. After checking some integration codes, it seems that we > have different strategy for Tomcat and Jetty, in Tomcat plugin, > after doing some verification and web service process work, Geronimo > will pass the web.xml file directly to Tomcat, and then Tomcat will > parse the web.xml file and call the addChild method to register all > the servlets to context. While in Jetty plugin, all the work is done > in Servlet GBean and Jetty will not check the web.xml file (At least > for servlet configurations). > So in Geronimo 3.0, who will be resposible for the annotation > and web fragment scanning. For Tomcat, one way is still to let > Tomcat does it, actually I found some related codes are added in > ContextConfig class. Although I found some errors while trying it, > it should be easy to solve. Another way is to scan by Geronimo, then > create a gbean for each servlet like Jetty, or just generate a full > web.xml file. > Personally, I wish to do it by Geronimo, so that Geronimo could > have a full control of it, which keeps the same way with Jetty. > Also, I have another idea about improving the class scanning, IIRC, > many builders require annoation scanning or file scanning, like web- > builder, webservice-builder, etc. I am thinking that whether we > could do all the scanning work in one round, not a new round search > would be triggered by each builder. Maybe, we could add some methods > like registerScanningHandler in the DeploymentContext, and once the > temp bundle is installed, all the scanning work be will done in one > round. > Any comment ? Thanks ! In tomcat, I think we have to let tomcat create the servlet wrapper objects. Several people have tried to turn them into gbeans but it conflicts with tomcat's attempt to manage the component lifecycle. I think we could write a jaxb-based processor to replace the tomcat digester one and this might simplify our code. I would prefer that geronimo scan for annotations and construct a complete web.xml from them and then process the web.xml either through our code (like in jetty) or through the web containers code (like in tomcat). Another possibility would be to use the new servlet 3.0 apis for adding servlets etc to a web app. We might be able to write a single processor to read through the metadata-complete web.xml and call the appropriate methods to construct the web app. At the moment I don't recall any geronimo-specific configuration that applies to specific servlets, filters, or listeners so this code might not need to look in geronimo plans very much. I like your idea of combining the annotation scanning. thanks david jencks > Ivan