Multiple applications inside a single container will pollute threads with wrong Time Zone information.
Running multiple applications in a single container that rely on the TimeZone.getDefault() method will cause problems where the time zone can not be reset inside the thread. For instance, if one application calls TimeZone.setDefault("GMT"), it will affect the TimeZone (or ZoneInfo) instance over the entire thread. If a second application is then run on that thread, it will pick up the default set by the previous container.
There is not much Tomcat since this particular problem lies in the JVM. With this said, there are couple of options, however:
1. Run each app on its own Tomcat instance
2. Write a valve/filter that resets the default timezone. Unfortunately there is not a way to divide the thread pool and assign them per application.
Option 1 would be the recommended and simple solution and use option 2 as the fallback.
Popular Links
Comments
Post new comment