You should be using a session per request pattern, rather than a transaction per request pattern. With a session per request pattern you can have multiple transactions in a sequence corresponding to the logic unit of work.
If you need to do a rollback after having done a flush, what do you expect the transaction rollback to do? John Davidson On Thu, Jul 22, 2010 at 11:57 AM, kor <[email protected]> wrote: > hi all, i have a web application where i use the transaction per > request pattern. > > samething i need to explitly force a flush, for example in a case i > need to delete an object and then do an insertion (i need to preserve > this order as sql operations), so at the moment i > begin the transaction, > do the delete with nhibernate, > flush the session > i do the insert, > commit/rollback the transaction. > > i want know if this is not very nice but works or if it has same bad > effects so i needs to find another solution to do only the > transaction.commit to flush the session > > -- > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- 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.
