You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to S#arp Architecture
Isn't it a good idea to roll back the transaction when unhandled
exception occurs?
In current version of Transaction attribute there is begin of the
transaction but there is no rollback.
I've had a problem when error occurred and table was locked until
transaction timeouts or I restart sql server instance.
I have modified TransactionAttribute code
public override void OnActionExecuted(ActionExecutedContext
filterContext)
{
if(NHibernateSession.Current.Transaction.IsActive)
{
if (filterContext.Exception != null)
NHibernateSession.Current.Transaction.Rollback();
else
NHibernateSession.Current.Transaction.Commit();
}
}
Now there is now active transactions left.
How do you think?
Billy
unread,
Jun 17, 2009, 12:24:28 AM6/17/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to S#arp Architecture
Great catch Sly...and thanks for the patch. I'm currently applying it
to the trunk.