getrailo/railo — pull request #70 by clitnak (2012-11-07 21:24:03+00:00)
Title: this.sessionClusterKey

when using this.sessionCluster = true and a shared session cache, it uses the application name as part of the storage key, so two applications with different names do not share the same storage. I realize that most of the time two instances of the same application (with the same name) will use the same storage, We have need of having two instances of the same application in the same JVM. Interestingly, we don't want them to share application scope variables, but we do want them to share session storage. This is mostly for testing environments (pretending to do load balancing and failover in the same JVM)

This implements a way for this to happen.

this.sessionClusterKey = "MyKey"

If you set that to be the same for two applications instances but with different application names, they will share the session storage but will have two different applications, thus mimicking two identacl but separate application instances in the same jvm but sharing sessions.