Application deployment / redeployment traps for Tomcat without restarting

I read that with Tomcat 5.5+, you can deploy a war on a Tomcat server without rebooting. It sounds fantastic, but I think I'm too skeptical about this functionality and reliability. My previous experience (using Websphere) was that it was best to restart the server to avoid memory problems, etc. So I wanted to get feedback on what pitfalls can exist with Tomcat.

(To be sure of my experience, I developed Java applications for 5 years for a large company that shared application developers with application server engineers - we used Websphere, so I don’t have much experience with / setting up any application server)

+3
source share
2 answers

In general, there are several types of leaks, and they are used to redeploy scripts. For production systems, it is best to perform reboots, if possible, as in today's applications there are so many different components and libraries that it is very difficult to find them all and even harder to fix them. Especially if you do not have access to the entire source code.

  • Memory leak
  • Leaks Thread and ThreadLocal
  • Leaks ClassLoader
  • System resource leaks
  • Connection leaks

ClassLoader leaks are those that bite when redistributing .

They can be summoned by everyone. Indeed, I mean everything:

  • : , , , WebappClassloader Tomcat.
  • ThreadLocals: ThreadLocals . . ThreadLocal Thread, Thread , ThreadLocal , () . (ThreadLocals , Spring NamedThreadLocal). ThreadLocal , WebappClassloader, ClassLoader.
  • :, . EhCache CacheManager
  • : JavaBeans (, )
  • JDBC: .war . -
  • , ClassLoaders, Commons-Logging LogFactory

Tomcat, :

  • "" Tomcat
  • Tomcat , WebappClassloader. , null, webapp . NullPointerExceptions, , . Logger
  • Tomcat , . org.apache.catalina.core.JreMemoryLeakPreventionListener Tomcat 6.x

stresstesting - "" - Java.

+6

, , .

mhaller , . , . , , , , . , .., hickups , .

, IDE WAR ( , ) , , . MyEclipse .

+1

Source: https://habr.com/ru/post/1733564/


All Articles