public class AuditEntityListener {
@PrePersist
public void persist(Object entity) {
BeanManager beanManager = new BeanManagerLocator().getBeanManager();
Set<Bean<?>> beans = beanManager.getBeans(PrePersistAuditListener.class);
for (Bean<?> bean : beans) {
PrePersistAuditListener result = (PrePersistAuditListener) beanManager.getReference(
bean, PrePersistAuditListener.class, beanManager.createCreationalContext(bean));
result.prePersist(entity);