-->
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: need help configuring PostLoadEventListener
PostPosted: Wed Jun 30, 2010 10:56 am 
Newbie

Joined: Sat May 06, 2006 9:08 am
Posts: 8
I'm implementing a Hibernate 3.2.1 event listener that implements several EventListener interfaces:

public class MyEventListener implements
PreDeleteEventListener,
PostLoadEventListener,
PostInsertEventListener,
PostUpdateEventListener,
Initializable {

Here is the spring 2.5.6 applicationConfiguration.xml for the event listener:

<bean id="eventListener" class="com.mine.MyEventListener" />
<bean id="hibernateSessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"
destroy-method="destroy">

<property name="eventListeners">
<map>
<entry key="pre-delete"><ref local="eventListener" /></entry>
<entry key="post-insert"><ref local="eventListener" /></entry>
<entry key="post-load"><ref local="eventListener" /></entry>
<entry key="post-update"><ref local="eventListener" /></entry>
</map>
</property>

My event listener is not being used as the session's post-load listener. It is being used as the pre-delete, post-insert and post-update listeners.

Stepping through with the debugger, I see the session's post-load listener is a DefaultPostLoadEventListener. I don't understand why my post-load listener is not getting configured as the session's post-load listener.


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.