Re: TC4: web.xml and reloading
At 05:54 AM 12/09/01, you wrote: Remy Maucherat wrote: Essentially, yes. JAR reloading is not very reliable on my Windows box, though (and you can't remove JARs; but strangely you can ovewrite them). Sometimes, the changes get picked up, sometimes they do not. I have yet to find the reasons for this, unfortunately :-( I have to back this statement up - jar reloading on TC4/Win2000 is a risky business, to say the least. Sometimes it works, sometimes not... I wonder if it's anything to do with the server checking for a new jar at the same time as the filesystem overwrites the old one? Swet! It means that I can package my properties files into a jar and the app will be reloaded when the new jar, with new properties arrives. Yup. -- * Jim Cheesman * Trabajo: [EMAIL PROTECTED] - (34)(91) 724 9200 x 2360 I have a twin brother; he's identical, but I'm not.
Re: TC4: web.xml and reloading
Jim Cheesman wrote: I have to back this statement up - jar reloading on TC4/Win2000 is a risky business, to say the least. Sometimes it works, sometimes not... I wonder if it's anything to do with the server checking for a new jar at the same time as the filesystem overwrites the old one? Nasty. Maybe it's a JDK for Win specific thingy, rather then a Tomcat bug? Does it work with IBM JDK? I'm having some problems with jar reloading in TC 3.3. But this is happening on Linux and the tricky part is that DependManager doesn't even report jar files as dependencies... Bojan
Re: TC4: web.xml and reloading
At 09:22 AM 12/09/01, you wrote: Jim Cheesman wrote: I have to back this statement up - jar reloading on TC4/Win2000 is a risky business, to say the least. Sometimes it works, sometimes not... I wonder if it's anything to do with the server checking for a new jar at the same time as the filesystem overwrites the old one? Nasty. Maybe it's a JDK for Win specific thingy, rather then a Tomcat bug? Does it work with IBM JDK? Haven't tried that... If I have time I'll download it and give it a go. I'm having some problems with jar reloading in TC 3.3. But this is happening on Linux and the tricky part is that DependManager doesn't even report jar files as dependencies... Bojan -- * Jim Cheesman * Trabajo: [EMAIL PROTECTED] - (34)(91) 724 9200 x 2360 I have a twin brother; he's identical, but I'm not.
Re: TC4: web.xml and reloading
On Wed, 12 Sep 2001, Bojan Smojver wrote: Date: Wed, 12 Sep 2001 10:40:21 +1000 From: Bojan Smojver [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Tomcat User List [EMAIL PROTECTED] Subject: TC4: web.xml and reloading I looked through the source code and in the documentation of the Loader to see if the change of web.xml will cause an application reload in TC4 when relaodable is set to true, but I couldn't find anything that would tell me that explicitly. I'm sure this is the case in TC3.3, I was just trying to establish if that was the case in TC4. When you set an application's Context entry to say reloadable='true', Tomcat starts a background task that watches for changes to *any* class that was originally loaded from /WEB-INF/classes or /WEB-INF/lib. If such a change is detected, the app will be reloaded. The default checking interval is 15 seconds, and can be changed like this: Context ... reloadable=true ... Loader checkInterval=5/ /Context Of course, you can reload any application at any time (whether or not you've set reloadable) by using the Manager application. Bojan Craig PS. Is there really any need to keep the current documentation on the web site? The experimental seems to be more comprehensive. The old stuff will be removed now that the new stuff has just become the official version. Up until very recently, the new format was not yet complete content-wise.
Re: TC4: web.xml and reloading
Craig R. McClanahan wrote: On Wed, 12 Sep 2001, Bojan Smojver wrote: Date: Wed, 12 Sep 2001 10:40:21 +1000 From: Bojan Smojver [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Tomcat User List [EMAIL PROTECTED] Subject: TC4: web.xml and reloading I looked through the source code and in the documentation of the Loader to see if the change of web.xml will cause an application reload in TC4 when relaodable is set to true, but I couldn't find anything that would tell me that explicitly. I'm sure this is the case in TC3.3, I was just trying to establish if that was the case in TC4. When you set an application's Context entry to say reloadable='true', Tomcat starts a background task that watches for changes to *any* class that was originally loaded from /WEB-INF/classes or /WEB-INF/lib. If such a change is detected, the app will be reloaded. The default checking interval is 15 seconds, and can be changed like this: Context ... reloadable=true ... Loader checkInterval=5/ /Context Of course, you can reload any application at any time (whether or not you've set reloadable) by using the Manager application. My question was about web.xml, not the classes and jars (that's explained in Loader docs). If web.xml changes, TC3.3 will dump the app and reload because web.xml gets stored in the DependManager (from memory). Does TC4 behave the same? Bojan
Re: TC4: web.xml and reloading
My question was about web.xml, not the classes and jars (that's explained in Loader docs). If web.xml changes, TC3.3 will dump the app and reload because web.xml gets stored in the DependManager (from memory). Does TC4 behave the same? No web.xml reloading in TC 4. Remy
Re: TC4: web.xml and reloading
Remy Maucherat wrote: My question was about web.xml, not the classes and jars (that's explained in Loader docs). If web.xml changes, TC3.3 will dump the app and reload because web.xml gets stored in the DependManager (from memory). Does TC4 behave the same? No web.xml reloading in TC 4. Remy OK. Is there a way to force app reload from one of the servlets running within that app (apart from the obvious touching of classes or jars). Something like telling the classloader to dump the thing? Bojan
Re: TC4: web.xml and reloading
Remy Maucherat wrote: My question was about web.xml, not the classes and jars (that's explained in Loader docs). If web.xml changes, TC3.3 will dump the app and reload because web.xml gets stored in the DependManager (from memory). Does TC4 behave the same? No web.xml reloading in TC 4. Remy OK. Is there a way to force app reload from one of the servlets running within that app (apart from the obvious touching of classes or jars). Something like telling the classloader to dump the thing? You can use the manager servlet. See the manager webapp and the docs for more details. http://jakarta.apache.org/tomcat/tomcat-4.0-doc-exp/manager-howto.html Remy
Re: TC4: web.xml and reloading
Remy Maucherat wrote: Remy Maucherat wrote: My question was about web.xml, not the classes and jars (that's explained in Loader docs). If web.xml changes, TC3.3 will dump the app and reload because web.xml gets stored in the DependManager (from memory). Does TC4 behave the same? No web.xml reloading in TC 4. Remy OK. Is there a way to force app reload from one of the servlets running within that app (apart from the obvious touching of classes or jars). Something like telling the classloader to dump the thing? You can use the manager servlet. See the manager webapp and the docs for more details. http://jakarta.apache.org/tomcat/tomcat-4.0-doc-exp/manager-howto.html Remy OK. Sounds good. Anything like that for TC3.3 that you know of? BTW, what was the reason behind not including web.xml in the reload? It seems like a pretty important part of the app... Bojan
Re: TC4: web.xml and reloading
Craig R. McClanahan wrote: When you set an application's Context entry to say reloadable='true', Tomcat starts a background task that watches for changes to *any* class that was originally loaded from /WEB-INF/classes or /WEB-INF/lib. If such a change is detected, the app will be reloaded. The default checking interval is 15 seconds, and can be changed like this: Context ... reloadable=true ... Loader checkInterval=5/ /Context Of course, you can reload any application at any time (whether or not you've set reloadable) by using the Manager application. I looked through the StandardLoader code just to get the feel for the way it works. The way I understand it is that if a .jar file in WEB-INF/lib gets changed, the app is going to be reloaded (provided the above is specified). Does that mean that if I have a text file, rather then a class file, in one of those jars and I deploy a new version of the jar with only the text file changed, the app gets reloaded? Bojan
Re: TC4: web.xml and reloading
Craig R. McClanahan wrote: When you set an application's Context entry to say reloadable='true', Tomcat starts a background task that watches for changes to *any* class that was originally loaded from /WEB-INF/classes or /WEB-INF/lib. If such a change is detected, the app will be reloaded. The default checking interval is 15 seconds, and can be changed like this: Context ... reloadable=true ... Loader checkInterval=5/ /Context Of course, you can reload any application at any time (whether or not you've set reloadable) by using the Manager application. I looked through the StandardLoader code just to get the feel for the way it works. The way I understand it is that if a .jar file in WEB-INF/lib gets changed, the app is going to be reloaded (provided the above is specified). Does that mean that if I have a text file, rather then a class file, in one of those jars and I deploy a new version of the jar with only the text file changed, the app gets reloaded? Essentially, yes. JAR reloading is not very reliable on my Windows box, though (and you can't remove JARs; but strangely you can ovewrite them). Sometimes, the changes get picked up, sometimes they do not. I have yet to find the reasons for this, unfortunately :-( Remy
Re: TC4: web.xml and reloading
Remy Maucherat wrote: Essentially, yes. JAR reloading is not very reliable on my Windows box, though (and you can't remove JARs; but strangely you can ovewrite them). Sometimes, the changes get picked up, sometimes they do not. I have yet to find the reasons for this, unfortunately :-( Swet! It means that I can package my properties files into a jar and the app will be reloaded when the new jar, with new properties arrives. As for Windows, I don't use the platform all that much (and not at all for Java). The ratio here is 6:1 in favour of Linux. Bojan