DBZ-2847 Outbox event read-only to not generate updates

This commit is contained in:
Jiri Pechanec 2020-12-14 07:13:29 +01:00 committed by Gunnar Morling
parent 9a8cc6cbc4
commit b297030741

View File

@ -101,6 +101,7 @@ public void onExportedEvent(@Observes ExportedEvent<?, ?> event) {
// Unwrap to Hibernate session and save
Session session = entityManager.unwrap(Session.class);
session.save(OUTBOX_ENTITY_FULLNAME, dataMap);
session.setReadOnly(dataMap, true);
// Remove entity if the configuration deems doing so, leaving useful
// for debugging