<!--Quartz -->
<!-- TICKET REGISTRY CLEANER -->
<bean id="ticketRegistryCleaner" class="org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner"
p:ticketRegistry-ref="ticketRegistry" />
<bean id="jobDetailTicketRegistryCleaner" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="ticketRegistryCleaner"
p:targetMethod="clean" />
<bean id="triggerJobDetailTicketRegistryCleaner" class="org.springframework.scheduling.quartz.SimpleTriggerBean"
p:jobDetail-ref="jobDetailTicketRegistryCleaner"
p:startDelay="20000"
p:repeatInterval="5000000" />
DefaultTicketRegistryCleaner集成一个接口org.jasig.cas.ticket.registry.support.LockingStrategy,它有三个实现类:
org.jasig.cas.ticket.registry.support.NoOpLockingStrategy
org.jasig.cas.ticket.registry.support.JdbcLockingStrategy,这个已过期,不推荐使用
org.jasig.cas.ticket.registry.support.JpaLockingStrategy,这个在
cas 入门之十五:ticket 存储方案-jpa ticket存储
已经应用过;默认情况应用的是NoOpLockingStrategy;
如果我们应用其他的后台机制去处理过期ticket,则可能需要实现LockingStrategy接口。