Skip to end of metadata
Go to start of metadata
Table of Contents

New CAS documentation site

Icon

CAS documentation has moved over to apereo.github.io/cas, starting with CAS version 4.x. The wiki will no longer be maintained. For the most recent version of the documentation, please refer to the aforementioned link.

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:

  • JpaLockingStrategy (since 3.4.11)
  • NoOpLockingStrategy
  • JdbcLockingStrategy

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:

  • tableName = "LOCKS"
  • uniqueIdColumnName = "UNIQUE_ID"
  • applicationIdColumnName = "APPLICATION_ID"
  • expirationDataColumnName = "EXPIRATION_DATE"
  • platform = SQL92
  • lockTimeout = 3600 [1 hour]

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.

  • No labels