Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 33218 invoked from network); 3 Apr 2002 18:47:54 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 3 Apr 2002 18:47:54 -0000 Received: (qmail 13677 invoked by uid 97); 3 Apr 2002 18:47:10 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 13656 invoked by uid 97); 3 Apr 2002 18:47:10 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 13645 invoked from network); 3 Apr 2002 18:47:09 -0000 Message-ID: <3CAB4D92.3080301@latte.harvard.edu> Date: Wed, 03 Apr 2002 13:44:34 -0500 From: Mark Diggory Reply-To: mdiggory@latte.harvard.edu User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Servlet Destroy Method.... References: <20020403103316.J43543-100000@icarus.apache.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Wow, mine eye's have been opened! I had always thought it was just individual servlets that were reloaded. In this case I guess I can live with destroying everything on reload, because the stuff I wanted to keep up is stored in the ServletContext. Thanks for the clarification, Mark Craig R. McClanahan wrote: > > On Wed, 3 Apr 2002, Mark Diggory wrote: > > >>Date: Wed, 03 Apr 2002 12:24:31 -0500 >>From: Mark Diggory >>Reply-To: Tomcat Users List , >> mdiggory@latte.harvard.edu >>To: Tomcat Users List >>Subject: Re: Servlet Destroy Method.... >> >>Yes I was looking to "not do something" in the destroy() method if its >>just the case that the servlet is being reloaded by the server. >>Otherwise, if the server was actually going through a shutdown process >>then I want my destroy() method to do something. >> >> > > Java doesn't have any means to replace an existing class. So, when Tomcat > does a reload to reflect your updated servlet or bean class, it has to: > - Shut down the entire webapp > - Throw away the webapp class loader and all the classes > that were previously loaded from /WEB-INF/classes and /WEB-INF/lib > - Restart the entire webapp > > Given this, there is basically no difference between what Tomcat does on a > reload versus a normal shutdown (except, of course, for the fact that the > app is not restarted again). There also isn't anything you could really > do differently even if you knew which kind of shutdown it was, because the > rest of the webapp is getting thrown away as well as the class you just > recompiled. > > >>-Mark >> >> > > Craig > > > -- > To unsubscribe: > For additional commands: > Troubles with the list: > -- To unsubscribe: For additional commands: Troubles with the list: