Return-Path: Delivered-To: apmail-struts-dev-archive@www.apache.org Received: (qmail 65482 invoked from network); 13 Jul 2009 16:30:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jul 2009 16:30:17 -0000 Received: (qmail 24367 invoked by uid 500); 13 Jul 2009 16:30:26 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 24300 invoked by uid 500); 13 Jul 2009 16:30:26 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 24290 invoked by uid 99); 13 Jul 2009 16:30:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2009 16:30:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of musachy@gmail.com designates 209.85.212.178 as permitted sender) Received: from [209.85.212.178] (HELO mail-vw0-f178.google.com) (209.85.212.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2009 16:30:18 +0000 Received: by vwj8 with SMTP id 8so1937818vwj.23 for ; Mon, 13 Jul 2009 09:29:57 -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 :content-transfer-encoding; bh=bSUsnsbjvID4adRcr03vBYCWLlsgM8/qjsFBJmad+0I=; b=RBvvONC9Tg+1uR+rpWbnHwCuj2kuJFhH9f+TbIl1ohkBrjXbziV0vMT7JjrcmMp1gj 7gZIlzz0e/3zeTgAgLKPX9MsOvxP+0XjGTvIdn5JT7d+MhKUQsvkceHTSaIcChJYUtBG 1oWIj9S5V0ffujJYsYQ8cFev4ztvQWuNIYckk= 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:content-transfer-encoding; b=aCAaiPsgJB28Qbe6/mUMSlVXuviAcARkDhOXbCmde9aQki5FRFPMoyTsr1tObayrSF azgwYmliK2pFdfh1Rwnc3rT3ws3w+2364pRyww6d2jxz3l+Km4TYPsp47+/EhA+Kzyvq 02DLAvpxd5nhSWDxN70gbyIbvjA0AGkkPBI/k= MIME-Version: 1.0 Received: by 10.220.81.69 with SMTP id w5mr7501286vck.23.1247502597120; Mon, 13 Jul 2009 09:29:57 -0700 (PDT) In-Reply-To: <4A5B4054.4090004@newfield.org> References: <4A594774.3090807@newfield.org> <4A5AB88C.9040502@newfield.org> <4A5B4054.4090004@newfield.org> Date: Mon, 13 Jul 2009 09:29:57 -0700 Message-ID: Subject: Re: Class reloading From: Musachy Barroso To: Struts Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I am thinking about adding another constant which holds a list of regex, which if set, will limit what classes can be loaded by the reloading classloader. The reason for this, is that I would like to limit the reloaded classes to just my actions. If the reloading class loader loads something that is not an action, there is a good chance that instance of that class will be casted to the same class loaded by the original class loader, which fails with a class cast exception. musachy On Mon, Jul 13, 2009 at 7:10 AM, Dale Newfield wrote: > Musachy Barroso wrote: >> >> I could test the path as an absolute path, if it exist, use it, >> otherwise try it as a relative path to context root, sounds good? > > Almost. =A0The File interface can tell you whether or not a given instanc= e > (path) isAbsolute(). =A0Clearly if the (absolute or relative) file does n= ot > exist it should not be loaded, but existence shouldn't help you decide wh= ich > way to interpret the path. > > This does bring up the question: =A0If the given (.class or .jar) file do= es > not exist at deployment time, will creation of it/changes to it later > trigger reloading? =A0Either way, just to avoid confusion that bit of inf= o > should be added to the documentation. =A0(Hrm--looking at > FilesystemAlterationListener and ClassReloadingXMLWebApplicationContext > suggests that if the file exists at deployment time we should notice in > onFileChange as you currently do, but if it did not exist (and we want to > support later adding of classes/jars) we could be paying attention to > onFileCreate/onDirectoryCreate events, too.) > > Oh, and once again: =A0Musachy++ > > Lately it seems like Struts is improving more due to the heroic effort of= a > few individuals than as a result of a community effort. =A0(I have a feel= ing > that this has fairly consistently been the case throughout the lifetime o= f > struts v1 and v2.) =A0I'm happy that struts is improving, so I'm not tryi= ng to > discourage heroic effort, but I'm wondering if anyone has any suggestions > for how to get more involvement? > > -Dale > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org > For additional commands, e-mail: dev-help@struts.apache.org > > --=20 "Hey you! Would you help me to carry the stone?" Pink Floyd --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org