Reputation: 11297
I did not stop the server and copied a war file into it causing tomcat service to be in a hung state. The odd thing is that the new service worked fine whereas the old one stopped working.
Upvotes: 0
Views: 252
Reputation: 1108742
Tomcat may hang when you upgrade an existing WAR and one the libraries of the old WAR file has been locked and cannot be unloaded. You can see it by the exploded folder of the old WAR being almost empty, expect of one or more JAR files in /WEB-INF/lib
. You see this very often with JavaMail's mail.jar
on Windows based JVM's.
A solution to that is to set the antiResourceLocking
attribute of the webapp's <Context>
element to true
. Also see Tomcat Configuration Reference - The Context Container.
<Context antiResourceLocking="true">
Upvotes: 1
Reputation: 55032
NO you dont have to stop it.
eg: Tomcat administration panel, doesnt stop the server when you upload a war file to the server. if there exists a file with the same name it replaces the existing war file with the one you uploaded.
Upvotes: 0
Reputation: 8978
I never stop my tomcat server when rolling out an update of my web application i just click and drag but first thing i do do is remove all evidence of the old version, so this includes the war and the folder associated with the war file. I have not had any issues with doing this as of yet.
Upvotes: 0