[Serializable]
public class FlushFixEventListener : DefaultFlushEventListener {
public override void OnFlush(FlushEvent @event) {
try {
base.OnFlush(@event);
}
catch (AssertionFailure) {
// throw away
}
}
}
public class AutoFlushFixEventListener :
DefaultAutoFlushEventListener {
public override void OnAutoFlush(AutoFlushEvent @event) {
try {
base.OnAutoFlush(@event);
}
catch (AssertionFailure) {
We have no listener on Flush events, only on the PostInsert/Update/
Delete and PostCollectionRecreate/Update/Remove.
We have implemented a Unit of Work pattern, in which we set FlushMode
to Never and explicitly call Flush();
Our listeners spawn an Audit transaction that occurs within a
StatelessSession.
When Flush() completes, the log shows this AssertionFailure thrown
from the AbstractFlushingEventListener.PostFlush() call on a
collection belonging to an entity that was updated.
On Feb 17, 7:05 am, "allan.ritc...@gmail.com"
> > > > > Thanks...- Hide quoted text -
>
> - Show quoted text -
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
IEnumerable eventCollection = @event.Collection as IEnumerable;
if(eventCollection != null && @event.Collection.WasInitialized)
...audit
else
...skip
On Mar 24, 5:41 pm, Fabio Maulo <fabioma...@gmail.com> wrote:
> Probably is Not a bug.
> Are you loading a collection inside your listeners ?
>
> 2010/3/24 Michael diSibio <michael.disi...@gmail.com>
> > nhusers+u...@googlegroups.com<nhusers%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhusers?hl=en.
>
> --
> Fabio Maulo- Hide quoted text -