Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 70123 invoked from network); 24 Sep 2010 11:56:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Sep 2010 11:56:39 -0000 Received: (qmail 53991 invoked by uid 500); 24 Sep 2010 11:56:39 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 53385 invoked by uid 500); 24 Sep 2010 11:56:36 -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 53376 invoked by uid 99); 24 Sep 2010 11:56:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Sep 2010 11:56:35 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.191.124.148] (HELO web38205.mail.mud.yahoo.com) (209.191.124.148) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 24 Sep 2010 11:56:27 +0000 Received: (qmail 52424 invoked by uid 60001); 24 Sep 2010 11:56:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1285329365; bh=SKcrMLoSQE35oW4ft4LvtlpNrGNijz0vdwxIMuva77o=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=wvqeFskEZqWfOk5zF0Zm7cN6I8QebkqbFbaP5UlhFU8oMR+wkjhagOyTAIiau2t/Uok6C+zJ6pjCghVOW41rdCzPEJNNAyVd/P3u66z9ZRMTap2GkHH7C+ZUM/ruz3xMTsBUBn1vBtceeABrtg12VsnMKlkKqN3TyoTulFLdMNk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=gx/c5KvkjLovCdxVKx3cKc7HAqKjAvRtFQJ05DTHc9Zm/f/hcnKb6MWVKqWoOigvxKqBfpD9ijsDoL+hb3+iZ5IrSFXpo54ysKSWLy+RmbxrVRZxOv/0xuRzKzFFiUsRXhDBa8AGr3Rzvklg8Rgqdw9lCxqp2e0AzijGh8nTvzA=; Message-ID: <983334.49914.qm@web38205.mail.mud.yahoo.com> X-YMail-OSG: 5UtdmMYVM1nHWtVyMqKQHr06LTjsSjpk2FAoP809T0hmZt6 F.kebCpYJf.66Qs0yIva3lJmM7Ldc47xDqshoU6_0G2aJwsQ2z0w8a49stSo xU7AeHUh.ly0AGShodyC71rYfLLo7TmWCQ1oByxVL54_kHERVhyb.rUlL9dg BIiHrXbWA7Qd06sWf827kfS1FhsEqYykkV6tmy_otcBaR7tzY0Ts4NR_1Tu7 .XZsJM67PfdwfMrwCF3UkIaypvWZlQcuWlnJDAgWLmKoBdAdrvJL9UTEplN9 1w0nXdMGnnfibs3oKkFeSOFhY_PJbdhYulNDldZBQducgEaDjQy8V0W37YZh kyJEdxwyBU.4F1DECX..xBjbRsjKI Received: from [78.186.14.202] by web38205.mail.mud.yahoo.com via HTTP; Fri, 24 Sep 2010 04:56:05 PDT X-Mailer: YahooMailRC/497 YahooMailWebService/0.8.105.279950 References: <647007.84724.qm@web38201.mail.mud.yahoo.com> Date: Fri, 24 Sep 2010 04:56:05 -0700 (PDT) From: Gurkan Erdogdu Subject: Re: NamingContext Possible Bug To: Tomcat Developers List In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Konstatin,=0A=0AI think that this is not related with ResourceLink elements= . When you define =0Aglobal resource link in your Context.xml, Tomcat creat= es ResourceLinkRef for =0Athis entry. Then same scenario exists, it creates= object using =0AResourceLinkFactory and caches it. It is not desirable. Ch= anging (removing =0Acaching statements) this does not break anything.=0A=0A= I will open an issue.=0A=0ARegards;=0A=0A--Gurkan=0A=0A=0A=0A----- Original= Message ----=0AFrom: Konstantin Kolinko =0ATo: Tom= cat Developers List =0ASent: Fri, September 24, 2010= 2:36:46 AM=0ASubject: Re: NamingContext Possible Bug=0A=0A2010/9/21 Gurkan= Erdogdu :=0A> Hello folks,=0A>=0A> In NamingConte= xt implementation, if "lookup()" is a Reference, current=0A> implementation= caches the result of the NamingManager # getObjectInstance via=0A> followi= ng statements and changes the type of the entry. In the following=0A> looku= ps, same object is returned. I would like to write ObjectFactory that=0A> r= eturns new instance for each time lookup is called on its reference. But wi= th=0A> the current implementation, it is not possible to write such an obje= ct factory=0A> because of aferomentioned sitaution. I think that entry must= be stay as=0A> Reference instead of changing entry type.=0A>=0A> WDYT?=0A>= =0A=0AThere was some discussion previously, proposed and vetoed patch and= =0Asome issue in bugzilla. [1]=0A=0AFrom some later code review I think tha= t that code is used to handle=0A elements. That is, when you = have a global resource in=0Aserver.xml and a ResourceLink in your context.x= ml. [2] It would be=0Aundesirable to break that.=0A=0A=0A[1] https://issues= .apache.org/bugzilla/show_bug.cgi?id=3D47512=0A=0A[2] =0Ahttp://tomcat.apac= he.org/tomcat-6.0-doc/jndi-resources-howto.html#context.xml_configuration= =0A=0A=0ABest regards,=0AKonstantin Kolinko=0A=0A--------------------------= -------------------------------------------=0ATo unsubscribe, e-mail: dev-u= nsubscribe@tomcat.apache.org=0AFor additional commands, e-mail: dev-help@to= mcat.apache.org=0A=0A --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org