Hello,

I copied into WEB-INF and then deleted the applicationContext-dao.xml that
comes in resources (I 'exploded' Appfuse source into my project) and added
the following mapping:

<bean id="sessionFactory" ...>
  <property name="eventListeners">
    <map>
      <entry key="save-update"><ref local="saveOrUpdateListener" /></entry>
    </map>
  </property>
</bean>
<bean id="saveOrUpdateListener"
class="com.mycompany.myapp.dao.SaveOrUpdateListener" />

The class, SaveOrUpdateListener, extends the Hibernate
DefaultSaveOrUpdateEventListener,  and for the moment does nothing more than
a System.out. But it's only being called when I save or update the User
object. The only other object I have for the moment is Person, and it's just
a POJO, it doesn't have its own DAO or Manager. Could this be the reason why
my EventListener is not being called? 

Mind you, most of my objects will have DAOs and Managers, but many will be
simple POJOs that rely on GenericDaoHibernate and GenericManagerImpl for
CRUD. The EventListener should be being called, no?

Thanks!
Bob

-- 
View this message in context: 
http://www.nabble.com/EventListener-only-firing-on-User-object--tf4191374s2369.html#a11919503
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to