This MSDN articl e is a good link. Quote:
Both the XACT_STATE and @@ TRANCOUNT functions can be used to detect whether the current request has an active user transaction. @@ TRANCOUNT cannot be used to determine if this transaction was classified as an inconvenient transaction. XACT_STATE cannot be used to determine if there are nested transactions.
, , COMMIT , XACT_STATE , , , @@TRANCOUNT . ROLLBACK, , , .