I'm trying to register several hibernate listeners under JBoss 4.0.3 using EJB 3.
In my hibernate.cfg.xml I've defined:
Code:
<hibernate-configuration>
<session-factory>
<listener type="flush-entity" class="sirma.biz.TheFlushEntityListener"/>
<listener type="load" class="sirma.biz.TheLoadListener"/>
<listener type="save" class="sirma.biz.TheSaveListener"/>
<listener type="delete" class="sirma.biz.TheDeleteListener"/>
<listener type="dirty-check" class="sirma.biz.TheDirtyCheckListener"/>
...
where
Code:
public class TheFlushEntityListener extends DefaultFlushEntityEventListener
public class TheLoadListener extends DefaultLoadEventListener
...
JBoss instantiates all the configured listener classes at deploy-time. But it only calls the methods of the "load" listener. (The way I test this is via overriding all protected and public methods of the super classes and logging something before calling super.theMethod(...), but none of them is called, except for TheLoadListener.)
What might be the reason?