Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 80102 invoked from network); 30 Apr 2008 20:43:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Apr 2008 20:43:04 -0000 Received: (qmail 9526 invoked by uid 500); 30 Apr 2008 20:42:51 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 9503 invoked by uid 500); 30 Apr 2008 20:42:51 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 9486 invoked by uid 99); 30 Apr 2008 20:42:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2008 13:42:51 -0700 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 nileshbansal@gmail.com designates 64.233.170.184 as permitted sender) Received: from [64.233.170.184] (HELO rn-out-0910.google.com) (64.233.170.184) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2008 20:42:07 +0000 Received: by rn-out-0910.google.com with SMTP id e11so419701rng.17 for ; Wed, 30 Apr 2008 13:42:21 -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:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=AwUA5NxdwCC6WusctGha2XUX5ephZEuq2t5Dr57l8bg=; b=nr/lBpuB1MGo4KW8wcfGsEK2e5sgJ5NbPYQswGLI+xdIpk0dPt3BxH/yEck/sbEQvoZBDJVvmj/fUT+uSlYYDHkdVbTrq+pqolgsGTfSY21hwLMSDUF6mwfuOHC1VaRge4zsJAzqot/pQZC50aOWOeo1dL3fNce0EsRdJWhvq9g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=c2JX/p56yBp2qCJTHc9Ovu56sD5LZ4mDolKxjzpZVU7AJQg2mvZrIJmCVWl8fwwsHJXk8mpJDtzYtOngUmcQaZLhBs12ItusW7G0wBuECYVkK+BWaah+2tfzIlhPa4aVZu5gWUD7yCT6ELfs/JkMtDcnIye65gjMFH6te2fXxKY= Received: by 10.115.92.2 with SMTP id u2mr1290702wal.139.1209588140240; Wed, 30 Apr 2008 13:42:20 -0700 (PDT) Received: by 10.114.194.20 with HTTP; Wed, 30 Apr 2008 13:42:20 -0700 (PDT) Message-ID: Date: Wed, 30 Apr 2008 16:42:20 -0400 From: "Nilesh Bansal" To: "Tomcat Users List" Subject: Re: Partial context reload In-Reply-To: <6715CF65287F8F408DA109EC03AC6C0D03C63AD4F3@puma.melandra.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6715CF65287F8F408DA109EC03AC6C0D03C63AD4F3@puma.melandra.net> X-Virus-Checked: Checked by ClamAV on apache.org thanks. are there other app servers, other than tomcat, which may have similar functionality? thanks Nilesh On Tue, Apr 29, 2008 at 4:41 AM, Peter Crowther wrote: > > From: Nilesh Bansal [mailto:nileshbansal@gmail.com] > > > > I have a question regarding context reloading in tomcat. Our app > > consists of two type of Java class files (1) core modules consisting > > of many singletons which are initialized once by reading large files > > from filesystem at the start of application (2) helper classes mostly > > for formatting, e.g., a servlet that serves a PNG graph, formatting of > > time in different formats, and classic JSP tags extending TagSupport. > > > > Tomcat allows users to set "reloadable=true", but that reloads the > > whole context (even if a single class has changed). This means, our > > application has to initialize itself all over again which is time > > consuming (it reads lot of stuff from files in memory). Is there a way > > to set partial reload?? Which means, if one of the helper classes has > > changed (and core classes are intact), just replace that changed code > > in the context. > > > > Any help on this issue will be of great use to us. > > There's a hack, but it's pretty gross. If this is the only webapp on the server, you might be able to put the jars for the core classes in common/lib. They would be initialised once, and context reloads wouldn't reinitialise them. However, you'd then need to restart Tomcat to force a reload of the core classes - this is clearly not a solution that's appropriate for a Tomcat with several webapps on it! > > A second approach would be to have two webapps - one with your core and one with your helper classes. Change the communication between the two to use some appropriate mechanism that works between webapps. You could then reload one webapp independently of the other. > > I'm not aware of any facility for a partial reload other than this. > > - Peter > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > -- Nilesh Bansal --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org