4 Replies Latest reply on Jan 10, 2008 8:15 AM by mars1412

    configuration: hiberante events in seam


      I am trying to create some eventlisteners for hibernate:
      but my listeners seem not to fire.

      I think, it's just a configuration issue.

      I created a simple listener, by overriding the default hibernate update event listener:

      public class HibernateUpdateEventListener extends DefaultUpdateEventListener {
       public void onSaveOrUpdate(SaveOrUpdateEvent event) {
       System.err.println("update-event listener fired");

      the configuration in my hibernate.cfg.xml file:
      <event type="update">
       <listener class="com.twentyfouract.web.session.util.HibernateUpdateEventListener"/>

      this file will be located in my.ear/my.jar/hibernate.cfg.xml (in the same direcotry, as the seam.properties file)
      • is this the correct place fo the hibernate.cfg.xml file?
      • do I need some other configuration?
        When I now call update() in my EntityHome class, I expect the message to be written to stderr, which does not happen...