From 7356d2ba28352292576546751efc90e4d652cf67 Mon Sep 17 00:00:00 2001 From: Tim Bussmann Date: Thu, 24 Sep 2015 17:22:27 +0200 Subject: [PATCH 1/5] updated fody --- .../NServiceBus.SqlServer.csproj | 11 +++++++---- src/NServiceBus.SqlServer/packages.config | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj b/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj index e1fdd968b..75f5ba0ce 100644 --- a/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj +++ b/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj @@ -13,7 +13,8 @@ 512 true $(SolutionDir)NServiceBus.snk - a65d899d + + true @@ -78,18 +79,20 @@ - + + Designer + - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + + \ No newline at end of file diff --git a/src/NServiceBus.SqlServer/packages.config b/src/NServiceBus.SqlServer/packages.config index bb0c9e1a2..ef7143138 100644 --- a/src/NServiceBus.SqlServer/packages.config +++ b/src/NServiceBus.SqlServer/packages.config @@ -1,6 +1,6 @@  - + From 526ca20c0d2ae338f82a91382c0b9233beb95cf5 Mon Sep 17 00:00:00 2001 From: Tim Bussmann Date: Thu, 24 Sep 2015 17:43:06 +0200 Subject: [PATCH 2/5] added support for native transaction suppression --- src/NServiceBus.SqlServer/SqlServerMessageSender.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/NServiceBus.SqlServer/SqlServerMessageSender.cs b/src/NServiceBus.SqlServer/SqlServerMessageSender.cs index 5156dff94..4a0672feb 100644 --- a/src/NServiceBus.SqlServer/SqlServerMessageSender.cs +++ b/src/NServiceBus.SqlServer/SqlServerMessageSender.cs @@ -7,6 +7,7 @@ using Serializers.Json; using Unicast.Queuing; using System.Collections.Generic; + using NServiceBus.Pipeline; /// /// SqlServer implementation of . @@ -28,7 +29,9 @@ public class SqlServerMessageSender : ISendMessages public Dictionary SchemaNameCollection { get; set; } public UnitOfWork UnitOfWork { get; set; } - + + public PipelineExecutor PipelineExecutor { get; set; } + public SqlServerMessageSender() { ConnectionStringCollection = new Dictionary(StringComparer.InvariantCultureIgnoreCase); @@ -61,7 +64,9 @@ public void Send(TransportMessage message, Address address) schemaName = SchemaNameCollection[ address.Queue ]; } - if (UnitOfWork.HasActiveTransaction(queueConnectionString)) + bool suppressNativeTransactions; + PipelineExecutor.CurrentContext.TryGet("do-not-enlist-in-native-transaction", out suppressNativeTransactions); + if (UnitOfWork.HasActiveTransaction(queueConnectionString) && !suppressNativeTransactions) { //if there is an active transaction for the connection, we can use the same native transaction var transaction = UnitOfWork.GetTransaction(queueConnectionString); From a148af296d7745a5eddd858311f9098260ffacd6 Mon Sep 17 00:00:00 2001 From: Tim Bussmann Date: Thu, 24 Sep 2015 17:50:02 +0200 Subject: [PATCH 3/5] added NSB dependencies to nuspec file --- packaging/nuget/NServiceBus.SqlServer.nuspec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packaging/nuget/NServiceBus.SqlServer.nuspec b/packaging/nuget/NServiceBus.SqlServer.nuspec index 71c8a30f4..990b22a99 100644 --- a/packaging/nuget/NServiceBus.SqlServer.nuspec +++ b/packaging/nuget/NServiceBus.SqlServer.nuspec @@ -15,6 +15,8 @@ nservicebus servicebus msmq cqrs publish subscribe + + From 5e896c5eaf2f53ba6ae39ff1dd302455b130b0c1 Mon Sep 17 00:00:00 2001 From: Tim Bussmann Date: Thu, 24 Sep 2015 18:21:36 +0200 Subject: [PATCH 4/5] downgrade dependencies to NSB 4.4.8 --- src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj | 8 ++++---- src/NServiceBus.SqlServer/packages.config | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj b/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj index 75f5ba0ce..563c08c9d 100644 --- a/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj +++ b/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj @@ -43,12 +43,12 @@ False - - ..\packages\NServiceBus.Interfaces.4.7.5\lib\net40\NServiceBus.dll + + ..\packages\NServiceBus.Interfaces.4.4.8\lib\net40\NServiceBus.dll True - - ..\packages\NServiceBus.4.7.5\lib\net40\NServiceBus.Core.dll + + ..\packages\NServiceBus.4.4.8\lib\net40\NServiceBus.Core.dll True diff --git a/src/NServiceBus.SqlServer/packages.config b/src/NServiceBus.SqlServer/packages.config index ef7143138..1af0a64af 100644 --- a/src/NServiceBus.SqlServer/packages.config +++ b/src/NServiceBus.SqlServer/packages.config @@ -3,7 +3,7 @@ - - + + \ No newline at end of file From 9e640a78f13a5df282b2b4d96dd1fc212859fa40 Mon Sep 17 00:00:00 2001 From: Tim Bussmann Date: Fri, 25 Sep 2015 18:29:41 +0200 Subject: [PATCH 5/5] added native tx suppression support flag --- src/NServiceBus.SqlServer/SqlServerTransport.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NServiceBus.SqlServer/SqlServerTransport.cs b/src/NServiceBus.SqlServer/SqlServerTransport.cs index a9460ecfb..fb6a6fe6e 100644 --- a/src/NServiceBus.SqlServer/SqlServerTransport.cs +++ b/src/NServiceBus.SqlServer/SqlServerTransport.cs @@ -19,7 +19,9 @@ protected override string ExampleConnectionStringForErrorMessage protected override void InternalConfigure(Configure config) { - + // required for TimeoutPersistenceVersionCheck on NSB.Core + SettingsHolder.Set("NServiceBus.Transport.SupportsNativeTransactionSuppression", true); + Enable(); Enable(); }