当前位置: 首页 > 图文教程 > 服务器 > 服务器其他 > tomcat antiResourceLocking antiJARLocking 的作用和用法

服务器其他
IMAIL系统修改IP地址的处理方法
为什么开通主机时发给用户的邮件用户收不了?
IIS 6中访问 .rmvb出错的原因
HTTP 500错误是什么意思?
建议的分区办法
代理上传图片目录FreeHostAgentPhoto的权限要求
Mysql 自检时出错:命令为:set password for test7i24@....
如何增加mysql的最大连接数
超过了脚本运行的最长时间..Server.ScriptTimeOut 属性指定新值
做一个简单的PHP测试页来测试是否正常
怎么样才能支持WAP?
用root用户登陆PHPmyAdmin出现Client does not support authentication ...
如何修改Mysql数据库的保存目录?
在安装平台前,如果使用了SCW(安全配置向导)会造成出错
受控端我可以用人家共用吗?同一个受控端,不同的主控端
为什么我新开的代理站无法访问?
系统参数中选择本系统的DNS时,注册不成功,选择注册商的DNS才可以
我手工将原来的数据复制进WEB目录,磁盘的配额占用全是0字节
用户目录上只用了几十M ,为什么在后台显示用了500M了呢
原来可以正常使用,现在一自检就提示:未指定的错误

服务器其他 中的 tomcat antiResourceLocking antiJARLocking 的作用和用法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-04   浏览: 219 ::
收藏到网摘: n/a

tomcat 里 antiResourceLocking 和 antiJARLocking 的作用和用法 我们先来看看这个 antiResourceLocking 到底是干什么的!
If true, Tomcat will prevent any file locking. This will significantly impact startup time of applications, but allows full webapp hot deploy and undeploy on platforms or configurations where file locking can occur. If not specified, the default value is false.
Please note that setting this to true has some side effects, including the disabling of JSP reloading in a running server: see Bugzilla 37668.
Please note that setting this flag to true in applications that are outside the appBase for the Host (the webapps directory by default) will cause the application to be deleted on Tomcat shutdown. You probably don't want to do this, so think twice before setting antiResourceLocking=true on a webapp that's outside the appBase for its Host.
我大致翻译一下:
如果这个参数为true,那么将组织任何文件锁。这将明显的影响应用的启动时间,但允许webapps,可能发生锁的平台和配置下,支持完整的热部署和热卸载。如果不配置,默认值是false;
如果设置为true,有一些副作用,包括屏蔽了JSP文件在运行服务器上的重新加载。
如果设置为true,且部署在Host的AppBase目录外面(默认是webapps),在Tomcat关闭的时候将导致应用被删除。
最主要的就翻译到这里了。实际上,如果为false,因为存在锁,在你重新发布的时候,可能出现部分代码无法更新。因为原始文件可能因为被锁住了,不能删除。
当然,如果为false,那么部署的目录就是和包名相同了。如果是false,则会每次都放到一个临时目录下面,一个temp目录。这也是这个配置引发的一个副作用。
另外的一个类似的配置 antiJARLocking 是防止jar类库被锁定而无法删除这个作用的。