tomcat - Why shouldn't i turn on "antiJARLocking" in production environment? -
i'm running web-apps on tomcat7 server , having trouble undeploying them. seems windows keeps lock on particular jar file in application folder. i've found there context attribute called "antijarlocking" can set 'true' (defined here: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#standard_implementation) may solve problem.
the fact is, i've seen couple of people stating should not set attribute true in production environment; can't find reasons that. know setting attribute true may slow down tomcat startup and/or application startup, not sound big problem me..? wrong?
do know other reason explain why may discourage use of "antijarlocking" in production? there other solution jar locking problem?
if can of help, i'm running tomcat 7.0.40. jar file keeps getting locked "ojbdc6.jar".
thank help!
tomcat's anti-resource locking features provided work around bugs in deployed web applications result in files being opened not closed. on operating systems - windows - prevents file being deleting in turn prevents web application being undeployed. usually, way delete files stop tomcat first. anti-resource locking copies web application uniquely named directory in work directory , deploys there. each redployment gets new directory not being able delete old directory not immediate problem.
there no specific reason why anti-resource locking features should not used in production. however, need aware locked files memory leak , after multiple redeploys may end filling permgen , triggering oome.
the quick , dirty solution odbc6.jar being locked move web-inf/lib $catalina_home/lib. better solution figure out why locked (you'll need use combination of profiler , debugger find root cause) , fix it.
Comments
Post a Comment