public void setPersistenceInterceptor(PersistenceContextInterceptor persistenceInterceptor) {
this.persistenceInterceptor = persistenceInterceptor;
}
public Message<?> preSend(Message<?> message, MessageChannel messageChannel) {
EventMessage event = (EventMessage)message.getHeaders().get(EventsPublisherGateway.EVENT_OBJECT_KEY);
if (event != null && event.isGormSession()) {
persistenceInterceptor.init();
log.debug("intercepting");
}
return message;