use of org.apereo.cas.configuration.model.core.ticket.registry.TicketRegistryProperties 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