Jasig-CAS is a well-known Web Based Single-Sign-Framework developed with almost all Spring features. Basically you can get more information from the documentation.
TicketRegistryCleaner deletes tickets from datasource based on your configuration. In a High Available (HA) configuration tickets are persisted on databases to serve multiple clients and services with multiple cas-servers. This deletion locks and sometimes casuses deadlocks in oracle since it uses update for. Jasig-Wiki suggests developers to use appropriate locking strategies for their architecture. Although using JPALocking strategy for HA environments is not enough to solve deadlock problems in jasig-cas.
After working with our oracle database administrators i decided to develop a new TicketRegistryCleaner that is only active in one of cas-servers and just cleans the tickets at midnight 02:00 to 05:00.
This kind of approach is not solving the deadlocks, it just pushes the deadlock problems to midnights. If it is necessary for the cleanup a stored procedure can be written to delete the unused and timeout tickets. In the below you will see scheduled registry cleaner source code.