Lachezar
Mar 9th, 2005, 04:22 AM
Hello all.
I have a very strange problem, and although I am almost sure where it lies, I have had absolutely no success in solving this issue.
I have a .war application.
I am using a generic approach for persistance via an AOP Introduction DAO implementations.
However using AOP (and generating classes with it) renders the application unremovable. It seems that the framework (or the JVM in any case) holds references to the classes used in the AOP proxy, and when I try to undeploy the application, I get an error, because the .jar files in the WEB-INF/lib are held referenced, and can not be deleted. So when I undeploy the application I get the two .jars (one with the Introduction Interceptor implementation .class, and the other with the introduced interface .class) left in the deployment directory breaking any further attempts to (re)deploy the application. No other .jars are left in the WEB-INF/lib directory. The spring, hibernate, cglib and all other framework .jars get correctly removed with obviously no stale handlers.
Calling GC prior to undeploying the app makes no difference. Calling the GC after the undeploying makes no difference also. Calling both GC both before and after renders the same issue.
The only available fix/workaround is to completely shutdown Tomcat, manually remove the deployment directory, and startup Tomcat afterwards, which is obviously extremely time-hungry and very, very frustrating.
So the question itself: What Is Going On? Is it really an issue with the dynamic class generation? Or did I do something wrong? Can I fix it? Any pointers?
I have a very strange problem, and although I am almost sure where it lies, I have had absolutely no success in solving this issue.
I have a .war application.
I am using a generic approach for persistance via an AOP Introduction DAO implementations.
However using AOP (and generating classes with it) renders the application unremovable. It seems that the framework (or the JVM in any case) holds references to the classes used in the AOP proxy, and when I try to undeploy the application, I get an error, because the .jar files in the WEB-INF/lib are held referenced, and can not be deleted. So when I undeploy the application I get the two .jars (one with the Introduction Interceptor implementation .class, and the other with the introduced interface .class) left in the deployment directory breaking any further attempts to (re)deploy the application. No other .jars are left in the WEB-INF/lib directory. The spring, hibernate, cglib and all other framework .jars get correctly removed with obviously no stale handlers.
Calling GC prior to undeploying the app makes no difference. Calling the GC after the undeploying makes no difference also. Calling both GC both before and after renders the same issue.
The only available fix/workaround is to completely shutdown Tomcat, manually remove the deployment directory, and startup Tomcat afterwards, which is obviously extremely time-hungry and very, very frustrating.
So the question itself: What Is Going On? Is it really an issue with the dynamic class generation? Or did I do something wrong? Can I fix it? Any pointers?