use of org.apereo.cas.ticket.registry.support.JpaLockingStrategy in project cas by apereo.
the class JpaTicketRegistryConfiguration method lockingStrategy.
@Bean
public LockingStrategy lockingStrategy() {
final TicketRegistryProperties registry = casProperties.getTicket().getRegistry();
final String uniqueId = StringUtils.defaultIfEmpty(casProperties.getHost().getName(), InetAddressUtils.getCasServerHostName());
return new JpaLockingStrategy("cas-ticket-registry-cleaner", uniqueId, Beans.newDuration(registry.getJpa().getJpaLockingTimeout()).getSeconds());
}
Aggregations