@Override
    public Ticket updateTicket(final Ticket ticket) {
        return transactionTemplate.execute(status -> FunctionUtils.doUnchecked(() -> {
            LOGGER.trace("Updating ticket [{}]", ticket);
            val ticketEntity = getTicketEntityFrom(ticket);
            entityManager.merge(ticketEntity);
            LOGGER.debug("Updated ticket [{}]", ticketEntity.getId());
            return encodeTicket(ticket);
        }));
    }
JPA implementation of a CAS {@link TicketRegistry}. This implementation of
ticket registry is suitable for HA environments.

@author Scott Battaglia
@author Marvin S. Addison
@since 3.2.1
support/cas-server-support-jpa-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/JpaTicketRegistry.java