-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: 关于 Hibernate PostDeleteEventListener
PostPosted: Thu Jul 19, 2012 1:01 am 
Newbie

Joined: Thu Jul 19, 2012 12:46 am
Posts: 1
1、
public class HistoryListener implements PostDeleteEventListener {

/**
*
*/
private static final long serialVersionUID = -3371146583496621340L;


@Override
public void onPostDelete(PostDeleteEvent event) {

//TODO LOG

}
}

2、
<bean id="historyListener" class="com.newtouch.framework.listener.HistoryListener" ></bean>

3、
<property name="eventListeners">
<map>
<entry key="post-delete">
<ref bean="historyListener" />
</entry>
</map>
</property>


Question:

Normal deletion, logging, there is no problem, but when I delete an exception (a foreign-key associations), or will perform onPostDelete method, and log,

May I ask how to solve? Thank you !


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.