In testing NHibernate 3.2, I am trying to evaluate the NHibernate
events. I have done these steps:

1. Created a functioning app that retrieves records from a database
using NHibernate
2. Created a LoadEventListener that inherits from ILoadEventListener
and implemented the onLoad event.
3. Put this section in the appropriate place in hibernate.cfg.xml
    <event type="load">
      <listener class="NHibernateTest1.MyLoadListener,
NHibernateTest1" />
      <listener
class="NHibernate.Event.Default.DefaultLoadEventListener" />
    </event>

I also configured log4net so I could see NHibernate logging. When my
application runs, I have no errors and I see this in the log:
2011-12-14 16:42:56,581 - Event listeners:
Load=NHibernateTest1.Events.LoadEventListener, NHibernateTest1,
NHibernateTest1.MyLoadListener, NHibernateTest1,
NHibernate.Event.Default.DefaultLoadEventListener

It looks like my listener has been registered. Alas when I put a
breakpoint in the first line of my LoadListener's onLoad event and
debug the application, the breakpoint is never reached and the code
within the listener never executes when I load an entity from the
database. There is no logging during the entity loading that tells me
that any events was fired.

Is there anything that I am missing?

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to