public void onEvent(@Observes IVersionedApimanEvent apimanEvent) {
        if (!outboxActive) {
            LOGGER.trace("Outbox has been set as inactive, skipping event: {0}", apimanEvent);
            return;
        }

        ApimanEventHeaders headers = apimanEvent.getHeaders();
        String eventType = getType(apimanEvent);

        OutboxEventEntity outboxEvent = new OutboxEventEntity()
             .setEventVersion(headers.getEventVersion())
             .setType(eventType)
             .setSource(headers.getSource().toString())
             .setSubject(headers.getSubject())
             .setTime(headers.getTime())
             .setPayload(serializeWithoutHeaders(apimanEvent));

        EntityManager em = getActiveEntityManager();
        em.persist(outboxEvent);
        em.remove(outboxEvent);
        LOGGER.debug("Persisted event to transactional outbox & immediately deleted {0}", outboxEvent);
    }
Anything event fired that uses the {@link IVersionedApimanEvent} interface will be stored in the outbox.
Fire events using the CDI observable system; generally, they should be enrolled in a transaction to ensure
transactional properties.

<p>This is then packed into an {@link OutboxEventEntity} and stored.

<p>If the version number has not been set explicitly in the header segment by the implementor, it will be taken
from the {@link ApimanEvent} annotation, which can be placed on any {@link IVersionedApimanEvent} impl.
This allows multiple versions of an event to be detected/supported if that is necessary at some future point.

<p>If the type of the event has not been set, the FQCN will be used (i.e. full class name).

@param apimanEvent any {@link IVersionedApimanEvent} (usually fired by CDI observable subsystem).
manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/model/outbox/TransactionalOutboxService.java