Tomcat里antiResourceLocking的作用和引起的一个问题 .
2014-05-18 09:19
309 查看
今天在论坛看到了一个网友的提问:
奇怪的问题,文件上传到Tomcat下的temp目录里面了
虽然我肯定是配置的问题,不过我还真的没有自己遇到这个。
不过还好,楼主真的在配置文件里找到了问题,那就是 antiResourceLocking
我们先来看看这个 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
Please note that setting this to
Bugzilla 37668 .
Please note that setting this flag to true in applications that are outside the appBase for the Host (the
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目录。这也是这个配置引发的一个副作用。
另外的一个类似的配置
每天努力工作,每天都有收获。早上的经验继续有用,我先复制一份先。呵呵呵!
今天是个好日子,因为明天就是周末了,希望我能回天津,顺便祝大家周末好心情。
奇怪的问题,文件上传到Tomcat下的temp目录里面了
虽然我肯定是配置的问题,不过我还真的没有自己遇到这个。
不过还好,楼主真的在配置文件里找到了问题,那就是 antiResourceLocking
我们先来看看这个 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
truehas 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
webappsdirectory 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类库被锁定而无法删除这个作用的。
每天努力工作,每天都有收获。早上的经验继续有用,我先复制一份先。呵呵呵!
今天是个好日子,因为明天就是周末了,希望我能回天津,顺便祝大家周末好心情。
相关文章推荐
- tomcat antiResourceLocking antiJARLocking 的作用和用法
- Tomcat里antiResourceLocking的作用和引起的一个问题
- Tomcat中antiResourceLocking和antiJARLocking的作用
- Local Response Normalization作用——感觉LRN也是解决的梯度消失和爆炸问题,统计机器学习中的一个经典假设是“源空间(source domain)和目标空间(target domain)的数据分布(distribution)是一致的
- 初学者一个幼稚问题(TOMCAT指向工程)
- 一个包冲突引起的问题
- 今天在家装Tomcat服务器,郁闷了,遇到一个问题装好开启服务后 进入不了manager/
- 一个大小写引起的SVN无法Commit的问题
- 一段旧代码,引起的关于OO中一个问题的思考
- Hibernate session.clear()引起的一个问题
- 一个tomcat启动失败问题
- 自己写的一个pull模式的source filter,播放mpeg1 2可以,而播放wmv不行的问题
- 两个项目发布在tomcat下引起log4j冲突问题解决
- 一个操作符优先级顺序引起的问题
- 使用网上流传的一个数据库连接池在Proxy.newProxyInstance处引起 java.lang.ClassCastException 问题的解决方法
- 一个包冲突引起的问题
- Win Scoket编程中accpet 引起的一个问题
- 对 “Tomcat 5.5.7配置一个APP问题” 的补充
- 一个小配置错误引起的大问题
- 在Tomcat上运行Web程序时遇到的一个奇怪问题.