[jboss-user] [Persistence] - Hibernate PostDelete event listener not getting called
aejaz
do-not-reply at jboss.com
Thu Nov 19 01:15:58 EST 2009
Hi,
I have the following class in my jar file(which has all the EJBs)
which gets deployed on JBoss 5.0 AS.
public class MyClass implements PostDeleteEventListener,
PostInsertEventListener, PostUpdateEventListener, Initializable {
public void onPostDelete(PostDeleteEvent event) {
System.out.println("Post delete event received");
}
public void onPostInsert(final PostInsertEvent event) {
System.out.println("Post insert event received");
}
public void onPostUpdate(final PostUpdateEvent event) {
System.out.println("Post update event received");
}
public void initialize(final Configuration config) {
}
}
I have the following entries in my persistence.xml,
property name="hibernate.ejb.event.post-insert" value="org.hibernate.ejb.event.EJB3PostInsertEventListener, "services.util.MyClass"
property name="hibernate.ejb.event.post-update"
value="org.hibernate.ejb.event.EJB3PostUpdateEventListener, services.util.MyClass"
property name="hibernate.ejb.event.post-delete"
value="org.hibernate.ejb.event.EJB3PostDeleteEventListener, services.util.MyClass"
When I execute an update or insert HQL statement, corresponding
methods onPostUpdate() & onPostInsert() are being called but if
I execute a delete statement the corresponding onPostDelete()
method is not getting called.
Does anyone have any idea why this will not work.
Thanks,
Aejaz
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266450#4266450
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266450
More information about the jboss-user
mailing list