https://issues.apache.org/jira/browse/AMQNET-474
Fire only async error notifications if an error occurs during the transaction operations.
diff --git a/src/main/csharp/NetTxTransactionContext.cs b/src/main/csharp/NetTxTransactionContext.cs
index 55ed256..f0eb5f6 100644
--- a/src/main/csharp/NetTxTransactionContext.cs
+++ b/src/main/csharp/NetTxTransactionContext.cs
@@ -252,7 +252,7 @@
preparingEnlistment.ForceRollback();
try
{
- this.connection.OnException(ex);
+ this.connection.OnAsyncException(ex);
}
catch (Exception error)
{
@@ -301,8 +301,8 @@
Tracer.DebugFormat("Transaction[{0}] Commit failed with error: {1}",
this.TransactionId, ex.Message);
try
- {
- this.connection.OnException(ex);
+ {
+ this.connection.OnAsyncException(ex);
}
catch (Exception error)
{
@@ -362,8 +362,8 @@
AfterRollback();
enlistment.Done();
try
- {
- this.connection.OnException(ex);
+ {
+ this.connection.OnAsyncException(ex);
}
catch (Exception error)
{
@@ -422,8 +422,8 @@
this.TransactionId, ex.Message);
AfterRollback();
try
- {
- this.connection.OnException(ex);
+ {
+ this.connection.OnAsyncException(ex);
}
catch (Exception error)
{