Single CAS web application in a cluster
Posted
by Dolf Dijkstra
on Oracle Blogs
See other posts from Oracle Blogs
or by Dolf Dijkstra
Published on Thu, 4 Oct 2012 09:29:35 +0000
Indexed on
2012/10/04
15:46 UTC
Read the original article
Hit count: 214
/WebCenter
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 postfix 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
/webapps/cas/WEB-INF/spring-configuration/propertyFileConfigurer.xmlin a PropertyPlaceholderConfigurer.
The documentation for PropertyPlaceholderConfigurer:
http://static.springsource.org/spring/docs/2.0.x/api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html
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:
host.name=${cluster.node.id}
Next step is to change the startup scripts for the managed servers and add a system property for -Dcluster.node.id=<something unique and stable>.
Viola, the postfix is externalized and the web application can be shared amongst the cluster nodes.
© Oracle Blogs or respective owner