For the most part, the Jasig CAS Client for Java works fine in a distributed environment without additional configuration. However, in certain scenarios, such as when PGTIOUs are involved, additional support is needed.
As of Jasig CAS Client 3.1.9, support for a distributed ProxyGrantingTicketStorage has been implemented.
Including the Dependency
Instead of configuring the "cas-client-core" as a dependency within your project, include the following:
The memcached client is not available in the public repositories so it must be downloaded manually from http://code.google.com/p/spymemcached/
Configuring the Validation Filter
Configure the validation filter as usual. You'll note, that as of 3.1.9, there is one additional optional property: proxyGrantingTicketStorageClass
This property should be defined as: org.jasig.cas.client.proxy.EhcacheBackedProxyGrantingTicketStorageImpl for the Ehcache version or
That would mean:
In either instance, the CAS Client will use the no-arg constructor to instantiate the class. It relies on a separate configuration file. The next section will provide more details on that.
Configuring the EhCache
When loading from the web.xml, the Jasig CAS Client relies on a series of default values, one of which being that the cache must be configured in the default location (i.e. classpath:ehcache.xml). For those who need more fine-grained control, they should look at the Spring Configuration options.
Configuring the Memcached Servers
When loading from the web.xml, the Jasig CAS Client relies on a series of default values, one of which being that the list of memcached servers must be defined in "/cas/casclient_memcached_hosts.txt" on the classpath). For those who need more fine-grained control, they should look at the Spring Configuration options.
The file is a simple list of <hostname>:<ports> on separate lines. BE SURE NOT TO HAVE EXTRA LINE BREAKS.