Hi All,
I currently have a @PostPersist annotation on a method in one of my domain classes:
Code:
@PostPersist
public void createNotification() {
new ActivityAuditorDelegate().createNotification(this);
}
The ActivityAuditorDelegate class is an @Configurable and I am Autowiring in some the required Service class.
Code:
@Configurable(dependencyCheck = true, autowire = Autowire.BY_TYPE)
public class ActivityAuditorDelegate {
@Autowired
private NotificationService notificationService;
The delegate calls a service class method as follows:
Code:
@Transactional
public void distributeNotifications(Long accountId, Long activityId) {
Notification n = new Notification();
this.createNotification(n);
I have run debug and know that the method is definitely getting executed, but the Notificaiton never gets persisted - is there any additional config I need?
I can provide the log if it would be useful.
Thanks..