use of javax.persistence.PreUpdate in project deltaspike by apache.
the class AuditEntityListener method update.
@PreUpdate
public void update(Object entity) {
BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager();
Set<Bean<?>> beans = beanManager.getBeans(PreUpdateAuditListener.class);
for (Bean<?> bean : beans) {
PreUpdateAuditListener result = (PreUpdateAuditListener) beanManager.getReference(bean, PreUpdateAuditListener.class, beanManager.createCreationalContext(bean));
result.preUpdate(entity);
}
}
Aggregations