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
|
|