Recently a customer wanted to set up a cluster of CAS nodes to be used together with WebCenter Sites. In the process of setting this up they realized that they needed to create a web application per managed server. They did not want to have this management burden but would like to have one web application deployed to multiple nodes. The reason that there is a need for a unique application per node is that the web-application contains information that needs to be unique per node, the postfix for the ticket id. My customer would like to externalize the node specific configuration to either a specific classpath per managed server or to system properties set at startup.
It turns out that the post-fix for ticket ids is managed through a property host.name and that this property can be externalized.
The host.name property is used in: /webapps/cas/WEB-INF/spring-configuration/uniqueIdGenerators.xml
It is set in in a PropertyPlaceholderConfigurer: /webapps/cas/WEB-INF/spring-configuration/propertyFileConfigurer.xml
The documentation for PropertyPlaceholderConfigurer. This indicates that the properties defined through the PropertyPlaceHolderConfigurer can be externalized. To enable this externalization you would need to change host.properties so it is generic for all the managed servers and thus can be reused for all the managed servers:
Next step is to change the startup scripts for the managed servers and add a system property:
-Dcluster.node.id=<something unique and stable>
Viola, the post-fix is externalized and the web application can be shared amongst the cluster nodes.