Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Servlet/JSP/JSF/JavaFX Script  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
reply to postflat modethreaded modego to previous topicgo to next topicgo to back
作者 when is the method Destory() invoked in Servlet
eqq2002





发贴: 22
于 2006-12-16 10:54 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
I post it here because I consider it is a basic question.It is said Java can destruct all objects automaticlly. So the most confused thing for me is why we still need destory(). When I started to study a couple of examples in javax.servlet.*; I found out some real reasons, you can save to local disk/medium the information as state descriptor or teminate a thread. Then comes the doubt, when Destory() is invoked in Servlet? It is the time that the my Servlet class is recompiling so Tomcat5.0(for example ) have to do that before load a new one, or the time Tomcat shutdown, or I invoke it by my other classes? Are these mentioned above right?And are there other situations? Especially the invoker is the Tomcat it self!
By the way,When the Tomcat Collapse suddenly , invoking seems not happen。




菜鸟请教,基本程序调试不通,急急急急急急!!!

话题树型展开
人气 标题 作者 字数 发贴时间
1795 when is the method Destory() invoked in Servlet eqq2002 798 2006-12-16 10:54

reply to postflat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923