As an advice to OP: Just move the logic inside "handleBan" to somewhere without Transaction. After that, in HandleBan, open a transaction, call newly created method, and commit the transaction. Do the same in Queue manager (begin transaction, do banning, update some other records, commit).
Therefore, you don't break UoW pattern not using nested transactions. (you cant do anyway) On Mon, Apr 30, 2012 at 2:28 PM, Maximilian Raditya <[email protected]>wrote: > Looking at his code and understanding from the way he expected the code to > behave, I think it's the first. That's why I suggest him to remove the > transaction code in BanHandler.Handle(Ban). He should only get active > ISession there and let the outer ITransaction handles the transaction (in > the QueryManager/Windows Service-level exposed API). > > > > > > On Mon, Apr 30, 2012 at 3:30 PM, Ramon Smits <[email protected]>wrote: > >> On Mon, Apr 30, 2012 at 10:25 AM, Maximilian Raditya <[email protected]>wrote: >> >>> I couldn't agree more then. Well, I personally don't use it, as I use >>> Castle NHibernate Integration for resolving it. It's just since the OP has >>> already used it, I choose to continue it from what he's done. >>> >> >> True, that is why the OP should decide whether the banhandler is part of >> the overal uow or it is not. If it is the first, the he should remove the >> transaction management in the ban handler to rely on the overal transaction >> or keep it seperate and let it create its own nhibernate session. >> >> Ramon >> >> -- >> 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. >> > > > > -- > Regards, > > Maximilian Haru Raditya > > -- > 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. > -- Sadullah Ceran, [image: LinkedIn] <http://www.linkedin.com/in/sadullahceran> [image: Twitter] <http://www.twitter.com/sadullahceran> [image: Facebook]<https://www.facebook.com/ceran> -- 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.
