I don't know whether this proposal has been made before so I apologize in advance if I'm rehashing an old idea. I'd like to propose a simple but powerful architectural change: each webapp should run in its own JVM. Benefits: * Ability to manage resources (memory, cpu, etc) on a per-webapp level * Improved fault-tolerance (a failing webapp won't take others down with it) * Ability to load JNI libraries from webapps without having to jump through any hoops or running into "java.lang.UnsatisfiedLinkError: Native Library x already loaded in another classloader." Please let me know what you think.
Just run multiple Tomcat instances. The overhead is minimal.
Mark, This isn't a matter of overhead. It's a matter of convenience. By providing a single management interface for multiple webapps you could enhance productivity that is not possible by using separate Tomcat instances today. For example: when a user asks to reload a webapp, you could preload Tomcat-minus-webapp sitting idle in the background. When the reload requests come in you simply shut down the old JVM and load the new webapp into the waiting JVM. If I were to implement this today the act of shutting down an instance and relaunching it serially would take a lot longer (and thereby reduce development productivity). What do you think?
If you don't accept the premise of a full-blown architectural change, is it possible to convert this RFE into a mechanism for reloading the webapps in the manner specified above? It would fix the UnsatisfiedLinkError I mentioned above, memory leak problems that have been plaguing us for years, while maintaining quick reloads.
(In reply to comment #3) > If you don't accept the premise of a full-blown architectural change, is it > possible to convert this RFE into a mechanism for reloading the webapps in the > manner specified above? It would fix the UnsatisfiedLinkError I mentioned > above, memory leak problems that have been plaguing us for years, while > maintaining quick reloads. Have a read of: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Parallel_deployment If you want to discuss this, the Users List is the place to do it.
Done: http://old.nabble.com/One-process-per-webapp-to31836121.html