title: How does class loading work when the same class exists in different applications on the same server?
body: <p>I have multiple web-apps running on an app server and each web-app WAR file contains a copy of the same jar file.</p>
  
  <p>Does this mean that a class in that jar file will be loaded multiple times in the JVM, once for each WAR file it exists in? Following on from that, if I have a static synchronized method in such a class, is it only synchronized among threads within the web-app it exists in but not synchronized against the same method in the same class in a different jar file in a different WAR file? (Hope the question makes sense, will clarify if necessary).</p>
  
  <p>If this is the case I presume the best solution is to remove the jar file from each WAR file and deploy it to a shared classpath folder on the server?</p>