-->
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: Configuration Listener for specific entity type
PostPosted: Tue Apr 20, 2010 5:08 am 
Newbie

Joined: Tue Apr 20, 2010 4:25 am
Posts: 1
Hi everyone,

I'm trying to configure my listener by type of an Entity
My current configuration :

<bean id="myDefaultFlushEntityListener" class="com.MyDefaultFlushEntityListener"/>
<bean id="sessionFactory"
.......
<property name="eventListeners">
<map>
<entry key="flush-entity"> <ref local="myDefaultFlushEntityListener">
</map>
</property>
</bean>

I just want to execute my listener for the flush of the entity Person ??
My only current solution is to write an "instanceof Person" in code MyDefaultFlushEntityListener.java

Is there a way to configure that to avoid many instanceof (that will maybe slow the application)?

Thanks


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.