-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Jakub,
On 4/16/13 2:25 PM, Jakub 1983 wrote: > When is it useful to define context.xml in some other place than > at /META-INF/context.xml inside the application files ? > > When do you usually do it ? Is it frequently used ? I am not asking > about theoretical possibilities, but how are they used in practical > scenarios. Two reasonably practical scenarios I can think of are: 1. When webapps are untrusted or only partially-trusted. 2. Ops team needs lots of configuration in production that the dev team doesn't need to worry about. > Most common case I encounter is in /META-INF/context.xml inside > the application files. > > Similary, do you ofter set explicitly CATALINA_BASE outside of > CATALINA_HOME ? I *always* set it to something different. It makes upgrades (and rollbacks, if necessary) trivial. > Most common scenario I see is deploying into > TomcatInstallDir(CATALINA_HOME)/webapps. > > When should CATALINA_BASE be defined ? When you want a shared Tomcat install (e.g. multiple JVM setup) or you want to have the ability to upgrade and downgrade with little difficulty... just change CATALINA_BASE and re-launch. > Is running each webapp on separate tomcat/jboss instead of running > all in the same tomcat / jboss an antipattern ? I wouldn't say that, but it depends upon your environment. In production, we run all apps in separate JVMs because it gives us a high degree of flexibility (and offers some measure of reliability, since webapps can't interfere with each other, but we have very stable webapps so that wouldn't likely be a problem for us in general). > In students handbooks and lectures it was said, that jars, memory, > resources are shared in one tomcat/jboss which is so good. Disk space is dirt cheap. Memory is fairly cheap (compared to ops and dev time). You can configure ClassLoaders to load from anywhere. > In practice we have memory leaks and need of restarts, conflicts > between versions of jars and classloaders. Time to fix! > And what are more problems running everything in one tomcat/jboss? That's mainly the problem above: memory usage and general stability. Another consideration is whether all of your webapps have been fully-tested under certain configurations. We run some webapps on Tomcat 7 and others on Tomcat 6. We even run under different JVM configurations (1.5, 1.6, and 1.7). > What do you see more ofte, all webapps in one server or each in > separate ? It always depends upon the environment. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRbZ9nAAoJEBzwKT+lPKRY5NsP/1DWvea3ueiLH623Zr0rVmB+ /7dPqg8B0dRzp5kD2hf3C8AujENfm8Bft+9TLVrTj3FjZ5TQC3v4VPJD8EB1DELl WTeIWrFu7t9+ZzjGzSjvFTV5jziwW4dUgjH2O8nVitTmbnYqv/QtK4beaN27F0CA 2tExAi+Z1VFTZR9PhYaCUt7ixmm5Tw3ahQl793YpjeBqCucFFNvt2tEpZg9rftpb GObKiDO63HCobqAn6ECQ2YDmEIJJuLz5cMYuG023E+77vPdkvgnf2MTMQwX2A8rc WT42jpIoawrJHK5QEGlgsVEm5uKJenX2WZNn0wjeGq/JfN3pzhqPN7iihGuRXLL9 ipJfJbMWVFh4j88g2bXv3/Fu3CieMi6d9PULn9/eZ2y7/fMcl4gdQKz767Bed1LH lenHmoE/gkYnI2KJOB3qG59e3bPtte83DSlqTgttQnq29zeKVScfVgIi681c0cbH q/x3WFOs2vjY27+Y+gKg2tZ9ZgtVEn0CX/WlGB5at/SV8M2LKKgVOnHFCipvSK7B xZGSfGkxZ8FiGB0pSWU2gGtsnN5z2KWM2xl4GX99/tTvkTgzGD6csESLxjCL6wfC 1sSvOx7W8s1MzYIoUSfpZ9h5g8XE3xjKtj+d8GDaFg+gZAoyyMIXz4zi02oRMnz1 qYltop1M8J8PREdJFubS =UxtZ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org