Deploy en caliente en servidor Tomcat 6.

Segun Tomcat 6 es posible hacer un deploy en caliente de una aplicación configurando algunos parámetros del contenedor.

Son dos los parametros que tenemos que considerar

antiJARLocking : If true, the Tomcat classloader will take extra measures to avoid JAR file locking when resources are accessed inside JARs through URLs. This will impact startup time of applications, but could prove to be useful on platforms or configurations where file locking can occur. If not specified, the default value is false.

antiJARLocking is a subset of antiResourceLocking and therefore, to prevent duplicate work and possible issues, only one of these attributes should be set to true at any one time.

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.

antiJARLocking is a subset of antiResourceLocking and therefore, to prevent duplicate work and possible issues, only one of these attributes should be set to true at any one time.

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.

Esto es algo asi como "Bajo su propia responsabilidad" (No le aseguramos que funcione) Por esta razon no es recomendable para aplicar en Produccion. PLOP!!!!!

La verdad es que se es así, no me sirve de mucho. Pero bueno veamos que wea.

Estos parametros se pueden ingresar en dos partes

1.- En el context.xml de nuestro proyecto

2.- en el context.xml del contenedor [CATALINA_HOME]/conf/context.xml


La línea a agregar es :

< Context antiJARLocking="true" antiResourceLocking="true" ...

Pero cuidado como leimos arriba.