Mantis - Resin
Viewing Issue Advanced Details
6473 minor always 07-29-22 11:01 07-29-22 11:33
nam  
nam  
high  
closed 4.0.66  
won't fix  
none    
none  
0006473: dependency_check_interval doesn't work on classes in classes/ directory
Even with dependency_check_interval disabled with:

    dependency_check_interval : -1

Resin is still checking for changes in class files in WEB-INF/classes. When one of those class files is modified, Resin will restart the webapp.

Steps to reproduce:

1. create file webapps/ROOT/index.jsp:

<%@ page session="false" import="test.*" %>
<%
    MyClass.foo();
%>

2. create class webapps/WEB-INF/classes/test/MyClass.java:

package test;
public class MyClass {
  public static void foo() {
    System.out.println("MyClass.foo()");
  }
}

4. start Resin

5. load http://localhost:8080/index.jsp [^] in browser

6. stop Resin

7. disable dependency_check_interval in resin.properties:

  dependency_check_interval : -1

8. start Resin

9. edit webapps/WEB-INF/classes/test/MyClass.class

10. load http://localhost:8080/index.jsp [^] in browser

11. notice that Resin restarts because MyClass.class was modified

Notes
(0007094)
nam   
07-29-22 11:33   
Unfortunately we will not fix this issue because:

    1. the fix may cause issues with other users

    2. a class may be garbage collected and reloaded by the JVM. So if the reloaded class was incompatible with the old one, then the webapp would crash. In this case, it is safer for Resin to restart the webapp.

However, there is a workaround by deploying the webapp as a WAR file.