Is there a recommended method of sharing static content such as PDF documents among two Tomcat instances run开发者_如何学运维ning on the same server?
Background: I want to migrate our app server from a single instance of Tomcat to two instances, using mod_jk, so we can update WAR files on one while the other continues to serve users (note: this is a single server and not a true cluster).
The issue we're encountering is how to ensure the ROOT webapp in both instances is pointing users to the same static content such as PDF files. We've looked at using 'allowLinking' along with a symlink pointing both ROOT webapps to a shared content directory.
But some folks advise against using allowLinking for security reasons. In addition, I've read that deleting/updating the WAR file will also delete the content on the symlink, which defeats the purpose of a having a single repository of static content outside the scope of the webapp/Tomcat instance.
精彩评论