Hum... You said that are using Burrow for session management but is
calling OpenSession from the SessionFactory directly?

@event.Session.SessionFactory.OpenSession()

I think you should get the session from:

ISession sess = new BurrowFramework().GetSession();

don't you ?



[]'s

Ricardo


2008/11/26 oorduz <[EMAIL PROTECTED]>:
>
> Hi,
>
> I have a project with Burrow for session management and I'm doing
> audit log functionality, to do that I've code the OnPostUpdate,
> OnPostDelete and OnPostInsert events (Nh 2.0).
>
> This project uses WCF, but the session is implemented by session-per-
> request pattern like Web project. In the events I've created a
> temporary session with a code like:
> using (ISession tempSession = @event.Session.SessionFactory.OpenSession
> ())
> {
>                    // Create audit log record
>                    object obj = auditService.LogInsert(@event.entity,
> newValues);
>                    if (obj != null)
>                    {
>                        tempSession.Save(obj);
>                        tempSession.Flush();
>                    }
> }
>
> In the start of request:
>            new BurrowFramework().InitWorkSpace();
>
> In the end of request:
>            new BurrowFramework().CloseWorkSpace();
>
>
> The problem: When I close the session (In the end of request) and some
> error occurs in the Db (Something like FK restriction) all transaction
> rollback EXCEPT the audit log!!
>
> Did I make some mistake to share transaction scope? Someone has
> implemented this functionality with Burrow?
>
> Thanks in advance
>
> Oscar
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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