The class looks like this:
public class MyClass implements PostDeleteEventListener,
PostInsertEventListener, PostUpdateEventListener, Initializable {
public void onPostDelete(PostDeleteEvent event) {
System.out.println("Post delete event");
}
public void onPostInsert(final PostInsertEvent event) {
System.out.println("Post insert event");
}
public void onPostUpdate(final PostUpdateEvent event) {
System.out.println("Post update event");
}
public void initialize(final Configuration config) {
}
}
persistence.xml values:
property
name="hibernate.ejb.event.post-insert"
value="org.hibernate.ejb.event.EJB3PostInsertEventListener, com.dgrid.htflex.services.util.MyClass"
property
name="hibernate.ejb.event.post-update"
value="org.hibernate.ejb.event.EJB3PostUpdateEventListener, com.dgrid.htflex.services.util.MyClass"
property
name="hibernate.ejb.event.post-delete"
value="org.hibernate.ejb.event.EJB3PostDeleteEventListener, com.dgrid.htflex.services.util.MyClass"
Problem is that System.out messages are coming on inserting a row in db and updating a row in db. But on a row deletion System.out message is not coming.
jboss-5.0.0.GA is used.