This is the cose:
from session number 1:
BEGIN TRY
BEGIN TRANSACTION
update TEST set A=1 where A=2;
COMMIT TRANSACTION
END TRY
BEGIN CATCH
IF (XACT_STATE()) = -1
BEGIN
ROLLBACK TRANSACTION
END
IF (XACT_STATE()) = 1
BEGIN
COMMIT TRANSACTION
END
END...