I have a folder with a lot of .class files. This classes are updated from ‘app 1’. And there is ‘app 2’ that loads those classes dinamically.
And the problem is….
‘app 2’ uses a class file, ‘app 1’ update that file, then ‘app 2’ needs again the class but it seemes to keep and to use a copy of the older class.
so, I checked the folder and the class was updated successfully, I tried to reload ‘app 2’ but it keeps using the older class.
Only if I restart tomcat ‘app 2’ reads the new class.
Why is that?
I’m allowed to reload ‘app 2’ but, in production enviroment, I cant restart tomcat.
Its very important in my job, I appreciate any idea…..
I’m using a clean installation of tomcat6 and I load the class files with:
Class.forName(<classname>).newInstance()
thx a lot
You are right!
This is a great explanation with an example about Alex´s idea