Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 29327 invoked from network); 3 Jul 2008 00:31:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jul 2008 00:31:53 -0000 Received: (qmail 15698 invoked by uid 500); 3 Jul 2008 00:31:47 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 15639 invoked by uid 500); 3 Jul 2008 00:31:47 -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 15628 invoked by uid 99); 3 Jul 2008 00:31:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2008 17:31:47 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of costin@gmail.com designates 209.85.128.191 as permitted sender) Received: from [209.85.128.191] (HELO fk-out-0910.google.com) (209.85.128.191) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jul 2008 00:30:57 +0000 Received: by fk-out-0910.google.com with SMTP id b27so458928fka.0 for ; Wed, 02 Jul 2008 17:31:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:in-reply-to:mime-version:content-type:references; bh=yFfLnd4xRL0l0HFv67LxHnRB+wVLvxye2DAouq36etM=; b=BX3wblIkm1Q8rjR/AszPt8s2HQt/SxnKWtny4kFV6pEQqY5zEHhF4/ONixUlJqiypb E37NPUTNksRfHFLhG/pUTomSpB4F18fEJ19Iv14ssqazx2MpoHJio8G9CFiVyaeRmPyx rGkvr6AXKTZXT4rp92By3BgpL/YygZQ3gk+bE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:in-reply-to:mime-version :content-type:references; b=XFR4mjG9Wxep6hJ2Xq7kwtmzN7HFvfoTKZqaMRVU4uZi8g9IqVVIm1CaHXF/4DSase 03uDHXtDKsxo6gbvrq/fMUtsI81UCi2CP459gfPWiyIYq9BNXXQv8agPym3iVK/MsYdd xKATfhZ8L1tS3WdfusQgXG1zUGvcUTVJzGIS0= Received: by 10.82.146.10 with SMTP id t10mr323409bud.31.1215045077128; Wed, 02 Jul 2008 17:31:17 -0700 (PDT) Received: by 10.82.100.2 with HTTP; Wed, 2 Jul 2008 17:31:16 -0700 (PDT) Message-ID: <96e4b5230807021731j2dfb32dfv21d0b99dec75affe@mail.gmail.com> Date: Wed, 2 Jul 2008 17:31:16 -0700 From: "Costin Manolache" Reply-To: costin@apache.org To: "Tomcat Developers List" Subject: Re: InstanceManager javadoc In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4892_30784365.1215045077071" References: <96e4b5230806281026y14ccd395kf750fb235c8df164@mail.gmail.com> <96e4b5230806290943w204f5a90pab61aae7115e51a1@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_4892_30784365.1215045077071 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, Jul 2, 2008 at 11:02 AM, David Jencks wrote: > > On Jun 29, 2008, at 9:43 AM, Costin Manolache wrote: > > Also, is there any documentation (or anyone who can explain) >> DefaultInstanceManager.processAnnotations() ? >> >> Sorry, I'm a bit confused, lots of calls and structures. >> >> I'm interested in particular in the 'injectionMap' - from what I read, the >> method takes the name of the >> field ( say 'foo' ), and even if it has no annotations it'll still inject >> it >> if something named 'foo' is found. >> The injectionMap would have something like "foo"->"jndiNameForFoo". >> >> This seems pretty dangerous - my understanding was that you need to have >> an >> annotation in order to >> have the Resource injected. >> > > you can also set up injections via web.xml. Even without this how is this > dangerous? The injection map isn't supplied by user code but by server > code. It can lead to confusing behavior - depending on how the annotation map is constructed. Having a similar field name in 2 servlets for example. If you use it to inject arbitrary fields in a specific class - and the injection map is specific to that class - then it works. But I guess this brings me back to the original question - javadoc on how is this supposed to work :-) > > > I'm not sure if the standalone tomcat annotation support actually does > anything. I wrote it to mimic the functionality of the original standalone > support (which again IIRC didn't appear to connect to anything useful) when > getting annotation/injection support to work in a way useful to geronimo. > Geronimo uses xbean-reflect to handle object creation and configuration > which is a very elegant solution IMO. Sure - this class could be used to replace some of the server.xml-based object creation ( i.e. xml attributes to setter ), and probably could be used to replace some of the JMX objection creation. And of course - it needs to be used to support @Resource. My point was that it looks like a very useful class - so having docs would be very nice. Costin > > > I'll try to find some time to remind myself of how this works and comment > on it.... but it may be a while. > > thanks > david jencks > >> >> >> I'll try searching the mail archives - the comments in the submits don't >> seem to have more info than the javadocs or >> comments... Again, sorry if it's something obvious. >> >> Costin >> >> >> On Sat, Jun 28, 2008 at 10:26 AM, Costin Manolache >> wrote: >> >> Hi, >>> >>> Just one small 'feature' request: >>> >>> Since InstanceManager in tomcat6 is in such a package ( org.apache - do >>> we >>> even have permission to use this ??), >>> could we have some javadocs ? >>> >>> What are the current plans for the annotation processing / dep injection >>> ? >>> Is this class the 'root' of all future >>> annotation processing ? >>> >>> Costin >>> >>> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > > ------=_Part_4892_30784365.1215045077071--