Mark Spritzler wrote:While I am not sure if LocalSessionFactoryBean has a property called eventListeners.
It looks to me like you have a circular reference going on here and Spring can't figure out which comes first, the Chicken or the Egg.
SessionFactory --- EventListeners -- EventListener -- EventListernerDAO -- SessionFactory
See how the references/dependencies work its way back to the SessionFactory.
Mark
As you say,when i config the "Hibernate EventListener" in the Spring,i found there was a circular between the sessionFactory and the Listeners(obviously this configaration is unreasonable and make me confused).
Dear Mark:
Is there any way that i can config the "Hibernate EventListener" in the Spring?
1/use an MethodInterceptor in a aspect??
2/config the "Hibernate EventListener" in the "hibernate.cfg.xml"??
3/or any other better ways???
Waiting for your guidance.....thanks~