Search in sources :

Example 1 with ExceptionGeneratedEvent

use of org.alfresco.sync.events.types.ExceptionGeneratedEvent in project alfresco-repository by Alfresco.

the class ExceptionEventsServiceImpl method exceptionGenerated.

@Override
public void exceptionGenerated(String txnId, Throwable t) {
    if (enabled) {
        try {
            long timestamp = System.currentTimeMillis();
            String networkId = TenantUtil.getCurrentDomain();
            String username = AuthenticationUtil.getFullyAuthenticatedUser();
            ExceptionGeneratedEvent event = new ExceptionGeneratedEvent(nextSequenceNumber(), txnId, timestamp, networkId, t, username);
            messageProducer.send(event);
        } catch (MessagingException e) {
            logger.error(e);
        }
    }
}
Also used : MessagingException(org.gytheio.messaging.MessagingException) ExceptionGeneratedEvent(org.alfresco.sync.events.types.ExceptionGeneratedEvent)

Aggregations

ExceptionGeneratedEvent (org.alfresco.sync.events.types.ExceptionGeneratedEvent)1 MessagingException (org.gytheio.messaging.MessagingException)1