As of 3.4, the Default Ticket Registry Cleaner has been enhanced to support high-availability environments.
When do I need to use a Ticket Registry Cleaner?
The ticket registry cleaner should be used for ticket registries that cannot manage their own state. That would include the default in-memory registry, the JPA-backed registry (unless you are executing manual SQL statements), etc. The Memcache-backed registry does not require a registry cleaner.
What do I need to configure?
If you're using the default Default Ticket Registry configuration, your WEB-INF/spring-configuration/ticketRegistry.xml probably looks like this:
You do not need to modify this at all.
But if I'm not using the default memory storage mechanism?
Since 3.4, we've introduced a new interface that integrates with the RegistryCleaner. Its called LockingStrategy (org.jasig.cas.ticket.registry.support.LockingStrategy). It comes with several implementations:
NoOpLockingStrategy is what is automatically configured in the above example (if you don't specify anything). If you're using the JPA-backed registry, you should expect to have to configure the JpaLockingStrategy (>= 3.4.11) or JdbcLockingStrategy (3.4.11).
For CAS >= 3.4.11 example JpaTicketRegistry configuration including the JpaLockingStrategy, see JpaTicketRegistry.
Example configuration using the JdbcLockingStrategy:
This will configure the cleaner with the following defaults:
You can override any of these properties. See the JavaDoc for more information.
If you're using other backing mechanisms, you would need to write an appropriate LockingStrategy and configure it similar to above.