From e2ec2acadacb76e7e8140a18741f04873ecd5588 Mon Sep 17 00:00:00 2001 From: yvesgoeleven Date: Fri, 16 Sep 2011 23:15:44 +0200 Subject: [PATCH] Added appfabric support & fixed bug in tablestorage driver which prevented saga tables from being created automatically --- .../AppFabricFullDuplex.ccproj | 70 ++++++++ .../AppFabricFullDuplex.sln | 38 ++++ .../MyMessages/MyMessages.csproj | 96 ++++++++++ .../MyMessages/Order.cs | 43 +++++ .../MyMessages/OrderStatus.cs | 9 + .../MyMessages/Properties/AssemblyInfo.cs | 36 ++++ .../MyMessages/SubmitOrderRequest.cs | 12 ++ .../MyMessages/SubmitOrderResponse.cs | 11 ++ .../OrderService/App.config | 21 +++ .../OrderService/EndpointConfiguration.cs | 7 + .../OrderService/Host.cs | 6 + .../SubmitOrderMessageHandler.cs | 31 ++++ .../OrderService/OrderService.csproj | 161 +++++++++++++++++ .../OrderService/Properties/AssemblyInfo.cs | 36 ++++ .../OrderService/WorkerRole.cs | 99 +++++++++++ .../OrderWebSite/Default.aspx | 56 ++++++ .../OrderWebSite/Default.aspx.cs | 36 ++++ .../OrderWebSite/Default.aspx.designer.cs | 51 ++++++ .../OrderWebSite/Global.asax | 1 + .../OrderWebSite/Global.asax.cs | 76 ++++++++ .../OrderWebSite/OrderWebSite.csproj | 162 +++++++++++++++++ .../OrderWebSite/Properties/AssemblyInfo.cs | 35 ++++ .../OrderWebSite/Web.config | 18 ++ .../ServiceConfiguration.cscfg | 41 +++++ .../ServiceDefinition.build.csdef | 51 ++++++ .../ServiceDefinition.csdef | 45 +++++ .../AppFabricPubSub.ccproj | 70 ++++++++ .../AppFabricQueuePubSub/AppFabricPubSub.sln | 38 ++++ .../Backup/AppFabricPubSub.ccproj | 68 ++++++++ .../Backup/AppFabricPubSub.sln | 38 ++++ .../Backup/MyMessages/LoadOrdersMessage.cs | 11 ++ .../MyMessages/LoadOrdersResponseMessage.cs | 27 +++ .../Backup/MyMessages/MyMessages.csproj | 98 +++++++++++ .../Backup/MyMessages/Order.cs | 44 +++++ .../Backup/MyMessages/OrderMessage.cs | 12 ++ .../Backup/MyMessages/OrderStatus.cs | 9 + .../Backup/MyMessages/OrderUpdatedEvent.cs | 11 ++ .../MyMessages/Properties/AssemblyInfo.cs | 36 ++++ .../Backup/OrderService/App.config | 21 +++ .../OrderService/EndpointConfiguration.cs | 7 + .../OrderService/EndpointInitialisation.cs | 12 ++ .../Backup/OrderService/Host.cs | 6 + .../LoadOrdersMessageHandlers.cs | 27 +++ .../MessageHandlers/OrderMessageHandler.cs | 39 +++++ .../Backup/OrderService/OrderList.cs | 63 +++++++ .../Backup/OrderService/OrderService.csproj | 151 ++++++++++++++++ .../OrderService/Properties/AssemblyInfo.cs | 36 ++++ .../Backup/OrderWebSite/Default.aspx | 58 +++++++ .../Backup/OrderWebSite/Default.aspx.cs | 46 +++++ .../OrderWebSite/Default.aspx.designer.cs | 51 ++++++ .../Backup/OrderWebSite/Global.asax | 1 + .../Backup/OrderWebSite/Global.asax.cs | 74 ++++++++ .../LoadOrdersResponseMessageHandler.cs | 14 ++ .../OrderUpdatedEventHandler.cs | 21 +++ .../Backup/OrderWebSite/OrderWebSite.csproj | 142 +++++++++++++++ .../OrderWebSite/Properties/AssemblyInfo.cs | 35 ++++ .../Backup/OrderWebSite/Web.config | 18 ++ .../Backup/ServiceConfiguration.cscfg | 44 +++++ .../Backup/ServiceDefinition.csdef | 43 +++++ .../MyMessages/LoadOrdersMessage.cs | 11 ++ .../MyMessages/LoadOrdersResponseMessage.cs | 27 +++ .../MyMessages/MyMessages.csproj | 98 +++++++++++ .../AppFabricQueuePubSub/MyMessages/Order.cs | 44 +++++ .../MyMessages/OrderMessage.cs | 12 ++ .../MyMessages/OrderStatus.cs | 9 + .../MyMessages/OrderUpdatedEvent.cs | 11 ++ .../MyMessages/Properties/AssemblyInfo.cs | 36 ++++ .../OrderService/App.config | 21 +++ .../OrderService/EndpointConfiguration.cs | 7 + .../OrderService/EndpointInitialisation.cs | 12 ++ .../AppFabricQueuePubSub/OrderService/Host.cs | 6 + .../LoadOrdersMessageHandlers.cs | 27 +++ .../MessageHandlers/OrderMessageHandler.cs | 39 +++++ .../OrderService/OrderList.cs | 63 +++++++ .../OrderService/OrderService.csproj | 164 ++++++++++++++++++ .../OrderService/Properties/AssemblyInfo.cs | 36 ++++ .../OrderService/WorkerRole.cs | 99 +++++++++++ .../OrderWebSite/Default.aspx | 58 +++++++ .../OrderWebSite/Default.aspx.cs | 46 +++++ .../OrderWebSite/Default.aspx.designer.cs | 51 ++++++ .../OrderWebSite/Global.asax | 1 + .../OrderWebSite/Global.asax.cs | 71 ++++++++ .../LoadOrdersResponseMessageHandler.cs | 14 ++ .../OrderUpdatedEventHandler.cs | 21 +++ .../OrderWebSite/OrderWebSite.csproj | 154 ++++++++++++++++ .../OrderWebSite/Properties/AssemblyInfo.cs | 35 ++++ .../OrderWebSite/Web.config | 18 ++ .../ServiceConfiguration.cscfg | 42 +++++ .../ServiceDefinition.build.csdef | 50 ++++++ .../ServiceDefinition.csdef | 41 +++++ .../OrderWebSite/Global.asax.cs | 27 ++- .../ServiceConfiguration.cscfg | 4 +- .../ServiceDefinition.build.csdef | 2 - .../AzureFullDuplex/ServiceDefinition.csdef | 2 - .../AzureHost/ServiceDefinition.build.csdef | 2 +- .../AzureHost/ServiceDefinition.csdef | 2 +- Samples/Azure/AzureHost/Worker/App.config | 4 +- .../AzurePubSub/ServiceConfiguration.cscfg | 4 +- .../AzurePubSub/ServiceDefinition.build.csdef | 1 - .../Azure/AzurePubSub/ServiceDefinition.csdef | 1 - .../Azure/AzureSagas/Barista/Barista.csproj | 4 +- .../Barista/BaristaMessageHandler.cs | 5 +- .../Azure/AzureSagas/Cashier/Cashier.csproj | 4 +- .../Cashier/CashierMessageHandler.cs | 19 +- .../CashierContracts/NewOrderMessage.cs | 1 + .../Azure/AzureSagas/Customer/Customer.csproj | 4 +- .../AzureSagas/Customer/CustomerOrder.cs | 11 +- .../TimeoutManager/TimeoutManager.csproj | 5 +- .../ServiceConfiguration.cscfg | 3 +- .../ServiceDefinition.build.csdef | 1 - .../ServiceDefinition.csdef | 1 - lib/NHibernate.Drivers.Azure.TableStorage.dll | Bin 50688 -> 50688 bytes lib/NHibernate.Drivers.Azure.TableStorage.pdb | Bin 142848 -> 126464 bytes nant.build | 1 + packages/repositories.config | 4 +- .../WindowsHost.cs | 2 +- .../DynamicHost/DynamicEndpointLoader.cs | 2 + .../NServiceBus.Hosting.Azure.csproj | 10 +- .../Handler/OnAzureStorageProfileHandler.cs | 2 +- .../WithAppFabricQueuesProfileHandler.cs | 14 ++ .../WithStorageQueuesProfileHandler.cs | 14 ++ ...AzureStorage.cs => OnAzureTableStorage.cs} | 4 +- .../Profiles/WithAppFabricQueues.cs | 6 + .../Profiles/WithAzureStorageQueues.cs | 6 + .../RoleHost/Entrypoint.cs | 2 +- .../Roles/Handlers/ClientRoleHandler.cs | 1 - .../Roles/Handlers/WorkerRoleHandler.cs | 4 +- .../ConfigureAppFabricQueue.cs | 16 +- ...us.Unicast.Queuing.AppFabric.Config.csproj | 9 +- .../app.config | 30 ++-- .../packages.config | 2 +- .../AppFabricQueue.cs | 35 ++-- ...erviceBus.Unicast.Queuing.AppFabric.csproj | 9 +- .../SendResourceManager.cs | 14 +- .../app.config | 29 ++++ .../packages.config | 2 +- src/azure/Queueing/queuing.sln | 14 ++ .../Internal/SessionFactoryBuilder.cs | 64 +++---- src/core/NServiceBus/Address.cs | 8 +- 139 files changed, 4187 insertions(+), 167 deletions(-) create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/AppFabricFullDuplex.ccproj create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/AppFabricFullDuplex.sln create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/MyMessages/MyMessages.csproj create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/MyMessages/Order.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/MyMessages/OrderStatus.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/MyMessages/Properties/AssemblyInfo.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/MyMessages/SubmitOrderRequest.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/MyMessages/SubmitOrderResponse.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderService/App.config create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderService/EndpointConfiguration.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderService/Host.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderService/MessageHandlers/SubmitOrderMessageHandler.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderService/OrderService.csproj create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderService/Properties/AssemblyInfo.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderService/WorkerRole.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Default.aspx create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Default.aspx.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Default.aspx.designer.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Global.asax create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Global.asax.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/OrderWebSite.csproj create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Properties/AssemblyInfo.cs create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Web.config create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/ServiceConfiguration.cscfg create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/ServiceDefinition.build.csdef create mode 100644 Samples/Azure/AppFabricQueueFullDuplex/ServiceDefinition.csdef create mode 100644 Samples/Azure/AppFabricQueuePubSub/AppFabricPubSub.ccproj create mode 100644 Samples/Azure/AppFabricQueuePubSub/AppFabricPubSub.sln create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/AppFabricPubSub.ccproj create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/AppFabricPubSub.sln create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/LoadOrdersMessage.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/LoadOrdersResponseMessage.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/MyMessages.csproj create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/Order.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/OrderMessage.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/OrderStatus.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/OrderUpdatedEvent.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/Properties/AssemblyInfo.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/App.config create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/EndpointConfiguration.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/EndpointInitialisation.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/Host.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/MessageHandlers/LoadOrdersMessageHandlers.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/MessageHandlers/OrderMessageHandler.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/OrderList.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/OrderService.csproj create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/Properties/AssemblyInfo.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Default.aspx create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Default.aspx.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Default.aspx.designer.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Global.asax create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Global.asax.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/MessageHandlers/LoadOrdersResponseMessageHandler.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/MessageHandlers/OrderUpdatedEventHandler.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/OrderWebSite.csproj create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Properties/AssemblyInfo.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Web.config create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/ServiceConfiguration.cscfg create mode 100644 Samples/Azure/AppFabricQueuePubSub/Backup/ServiceDefinition.csdef create mode 100644 Samples/Azure/AppFabricQueuePubSub/MyMessages/LoadOrdersMessage.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/MyMessages/LoadOrdersResponseMessage.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/MyMessages/MyMessages.csproj create mode 100644 Samples/Azure/AppFabricQueuePubSub/MyMessages/Order.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/MyMessages/OrderMessage.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/MyMessages/OrderStatus.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/MyMessages/OrderUpdatedEvent.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/MyMessages/Properties/AssemblyInfo.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderService/App.config create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderService/EndpointConfiguration.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderService/EndpointInitialisation.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderService/Host.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderService/MessageHandlers/LoadOrdersMessageHandlers.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderService/MessageHandlers/OrderMessageHandler.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderService/OrderList.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderService/OrderService.csproj create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderService/Properties/AssemblyInfo.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderService/WorkerRole.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Default.aspx create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Default.aspx.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Default.aspx.designer.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Global.asax create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Global.asax.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderWebSite/MessageHandlers/LoadOrdersResponseMessageHandler.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderWebSite/MessageHandlers/OrderUpdatedEventHandler.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderWebSite/OrderWebSite.csproj create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Properties/AssemblyInfo.cs create mode 100644 Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Web.config create mode 100644 Samples/Azure/AppFabricQueuePubSub/ServiceConfiguration.cscfg create mode 100644 Samples/Azure/AppFabricQueuePubSub/ServiceDefinition.build.csdef create mode 100644 Samples/Azure/AppFabricQueuePubSub/ServiceDefinition.csdef create mode 100644 src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/Handler/WithAppFabricQueuesProfileHandler.cs create mode 100644 src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/Handler/WithStorageQueuesProfileHandler.cs rename src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/{OnAzureStorage.cs => OnAzureTableStorage.cs} (63%) create mode 100644 src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/WithAppFabricQueues.cs create mode 100644 src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/WithAzureStorageQueues.cs create mode 100644 src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/app.config diff --git a/Samples/Azure/AppFabricQueueFullDuplex/AppFabricFullDuplex.ccproj b/Samples/Azure/AppFabricQueueFullDuplex/AppFabricFullDuplex.ccproj new file mode 100644 index 00000000000..7effe15117c --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/AppFabricFullDuplex.ccproj @@ -0,0 +1,70 @@ + + + + + Debug + AnyCPU + 1.5.0 + {adcfc6b6-8bf7-4d56-b6a4-f6d221111666} + Library + Properties + AppFabricService + AppFabricService + True + AppFabricService + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + OrderService + {84aca710-e5b3-4a46-b87a-7c12fb2527a8} + True + Worker + OrderService + + + OrderWebSite + {f3798c2c-41dc-407c-9ebe-3f10c1ca9a76} + True + Web + OrderWebSite + + + + + 10.0 + $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\1.5\ + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/AppFabricFullDuplex.sln b/Samples/Azure/AppFabricQueueFullDuplex/AppFabricFullDuplex.sln new file mode 100644 index 00000000000..7ebebedccf9 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/AppFabricFullDuplex.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{CC5FD16D-436D-48AD-A40C-5A424C6E3E79}") = "AppFabricFullDuplex", "AppFabricFullDuplex.ccproj", "{ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderWebSite", "OrderWebSite\OrderWebSite.csproj", "{F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService", "OrderService\OrderService.csproj", "{84ACA710-E5B3-4A46-B87A-7C12FB2527A8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{3871CC9B-235F-4E60-98F7-FEF04DB1201B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.Build.0 = Release|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.Build.0 = Release|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.Build.0 = Release|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/MyMessages.csproj b/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/MyMessages.csproj new file mode 100644 index 00000000000..f0d35423b2c --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/MyMessages.csproj @@ -0,0 +1,96 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + Library + Properties + MyMessages + MyMessages + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.dll + + + + + + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/Order.cs b/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/Order.cs new file mode 100644 index 00000000000..c05fe2e3382 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/Order.cs @@ -0,0 +1,43 @@ +using System; + +namespace MyMessages +{ + [Serializable] + public class Order + { + public Guid Id { get; set; } + public OrderStatus Status { get; set; } + + public int Quantity { get; set; } + + public bool Equals(Order other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return other.Id.Equals(Id); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != typeof (Order)) return false; + return Equals((Order) obj); + } + + public override int GetHashCode() + { + return Id.GetHashCode(); + } + + public static bool operator ==(Order left, Order right) + { + return Equals(left, right); + } + + public static bool operator !=(Order left, Order right) + { + return !Equals(left, right); + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/OrderStatus.cs b/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/OrderStatus.cs new file mode 100644 index 00000000000..2d78e051238 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/OrderStatus.cs @@ -0,0 +1,9 @@ +namespace MyMessages +{ + public enum OrderStatus + { + AwaitingApproval, + Approved, + Pending + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/Properties/AssemblyInfo.cs b/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..3ffd0007b74 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MyMessages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyMessages")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("39b14fdb-e9e9-4dab-96e5-919966481923")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/SubmitOrderRequest.cs b/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/SubmitOrderRequest.cs new file mode 100644 index 00000000000..0f595a8b807 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/SubmitOrderRequest.cs @@ -0,0 +1,12 @@ +using System; +using NServiceBus; + +namespace MyMessages +{ + [Serializable] + public class SubmitOrderRequest :IMessage + { + public Guid Id { get; set; } + public int Quantity { get; set; } + } +} diff --git a/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/SubmitOrderResponse.cs b/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/SubmitOrderResponse.cs new file mode 100644 index 00000000000..22d5abda068 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/MyMessages/SubmitOrderResponse.cs @@ -0,0 +1,11 @@ +using System; +using NServiceBus; + +namespace MyMessages +{ + [Serializable] + public class SubmitOrderResponse : IMessage + { + public Order Order{ get; set; } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderService/App.config b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/App.config new file mode 100644 index 00000000000..706dce9b6e3 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/App.config @@ -0,0 +1,21 @@ + + + + +
+ + + + + + + + + + + + + + + + diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderService/EndpointConfiguration.cs b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/EndpointConfiguration.cs new file mode 100644 index 00000000000..ec54b6ce114 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/EndpointConfiguration.cs @@ -0,0 +1,7 @@ +using NServiceBus; +using NServiceBus.Hosting.Azure.Roles.Handlers; + +namespace OrderService +{ + public class EndpointConfiguration : IConfigureThisEndpoint, AsA_Worker { } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderService/Host.cs b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/Host.cs new file mode 100644 index 00000000000..2a2f8d372c6 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/Host.cs @@ -0,0 +1,6 @@ +using NServiceBus.Hosting.Azure; + +namespace OrderService +{ + public class Host : RoleEntryPoint{} +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderService/MessageHandlers/SubmitOrderMessageHandler.cs b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/MessageHandlers/SubmitOrderMessageHandler.cs new file mode 100644 index 00000000000..16f08003e88 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/MessageHandlers/SubmitOrderMessageHandler.cs @@ -0,0 +1,31 @@ +using MyMessages; +using NServiceBus; +using Order=MyMessages.Order; + +namespace OrderService.MessageHandlers +{ + public class SubmitOrderMessageHandler : IHandleMessages + { + private readonly IBus bus; + + public SubmitOrderMessageHandler(IBus bus) + { + this.bus = bus; + } + + public void Handle(SubmitOrderRequest message) + { + var order = new Order + { + Id = message.Id, + Quantity = message.Quantity, + Status = OrderStatus.Pending + }; + + // Thread.Sleep(4000); //simulate processing + + var response = bus.CreateInstance(x=>x.Order = order); + bus.Reply(response); + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderService/OrderService.csproj b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/OrderService.csproj new file mode 100644 index 00000000000..158e3a7fead --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/OrderService.csproj @@ -0,0 +1,161 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8} + Library + Properties + OrderService + OrderService + v4.0 + 512 + Worker + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + ..\..\..\..\build\azure\hosting\Common.Logging.dll + + + ..\..\..\..\build\azure\hosting\Iesi.Collections.dll + + + ..\..\..\..\build\azure\hosting\Ionic.Zip.dll + + + False + ..\..\..\..\build\azure\hosting\log4net.dll + + + ..\..\..\..\build\azure\hosting\Microsoft.Practices.ServiceLocation.dll + + + False + ..\..\..\..\build\azure\hosting\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\..\build\azure\hosting\Microsoft.WindowsAzure.ServiceRuntime.dll + + + False + ..\..\..\..\build\azure\hosting\Microsoft.WindowsAzure.StorageClient.dll + + + ..\..\..\..\build\azure\hosting\NHibernate.dll + + + ..\..\..\..\build\azure\hosting\NHibernate.Drivers.Azure.TableStorage.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.dll + + + ..\..\..\..\build\azure\hosting\NServiceBus.Azure.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.Core.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.Hosting.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.Hosting.Azure.dll + + + ..\..\..\..\build\azure\hosting\NServiceBus.NHibernate.dll + + + + + + + + + + + + + + + + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + MyMessages + + + + + Designer + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderService/Properties/AssemblyInfo.cs b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..77fc28ac62a --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderService")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderService")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6fdad954-96d7-4733-b5ee-41733ae4f018")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderService/WorkerRole.cs b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/WorkerRole.cs new file mode 100644 index 00000000000..34da24466f9 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderService/WorkerRole.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections.Specialized; +using System.Threading; +using Common.Logging; +using log4net.Core; +using Microsoft.WindowsAzure.ServiceRuntime; +using MyMessages; +using NServiceBus; +using NServiceBus.Config; +using NServiceBus.Integration.Azure; + +namespace OrderService +{ + public class WorkerRole : RoleEntryPoint + { + public IBus Bus; + + public OrderList Orders = new OrderList(); + private ILog logger; + + public override void Run() + { + ConfigureLogging(); + + logger.Info("Starting order worker with instance id:" + RoleEnvironment.CurrentRoleInstance.Id); + + ConfigureNServiceBus(); + + while (true) + { + Thread.Sleep(10000); + + logger.Info("Approving orders"); + + foreach (var order in Orders.GetOrdersToApprove()) + { + var updatedOrder = Orders.UpdateStatus(order, OrderStatus.Approved); + + //publish update + var orderUpdatedEvent = Bus.CreateInstance(x => x.UpdatedOrder = updatedOrder); + Bus.Publish(orderUpdatedEvent); + } + } + } + + private void ConfigureNServiceBus() + { + + logger.Info("Initalizing NServiceBus"); + try + { + var config = Configure.With() + .SpringBuilder() + .AzureConfigurationSource() + .XmlSerializer() + .UnicastBus() + .LoadMessageHandlers() + .AzureQueuesTransport() + .IsTransactional(true) + .PurgeOnStartup(false) + .InMemorySubscriptionStorage();//we use inmemory storage until we have a sub storage for TableStorage or SQL Services + + Configure.Instance.Configurer.RegisterSingleton(Orders); + + Bus = config.CreateBus() + .Start(); + + } + catch (Exception ex) + { + logger.Error(ex); + throw; + } + + logger.Info("NServiceBus started"); + + } + + + private void ConfigureLogging() + { + LogManager.Adapter = new Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter(new NameValueCollection + { + {"configType","EXTERNAL"} + }); + + var appender = new AzureAppender + { + ConnectionStringKey = "AzureQueueConfig.ConnectionString", + Threshold = Level.Debug + }; + appender.ActivateOptions(); + + log4net.Config.BasicConfigurator.Configure(appender); + + logger = LogManager.GetLogger(typeof(WorkerRole)); + } + } +} diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Default.aspx b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Default.aspx new file mode 100644 index 00000000000..5c5901eedf5 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Default.aspx @@ -0,0 +1,56 @@ +<%@ Page Language="C#" AutoEventWireup="true" Async="true" CodeBehind="Default.aspx.cs" Inherits="OrderWebSite._Default" %> + + + + + + +
+
+ Enter quantity: + + +
+
+ Refresh the page after submitting orders (would of course use Ajax for this in production :) ) +
+
+ Click here to refresh orderlist +
+
+ + + + + + + + + + + + + + + + + +
+ Id + + Quantity + + Status +
+ <%# DataBinder.Eval(Container.DataItem, "Id") %> + + <%# DataBinder.Eval(Container.DataItem, "Quantity") %> + + <%# DataBinder.Eval(Container.DataItem, "Status") %> +
+ +
+
+ + + diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Default.aspx.cs b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Default.aspx.cs new file mode 100644 index 00000000000..e560ca43601 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Default.aspx.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using MyMessages; +using NServiceBus; +using Order = MyMessages.Order; + +namespace OrderWebSite +{ + public partial class _Default : System.Web.UI.Page, IHandleMessages + { + protected void Page_PreRender(object sender, EventArgs e) + { + lock (Global.Orders) + OrderList.DataSource = new List(Global.Orders); + + OrderList.DataBind(); + } + + protected void btnSubmit_Click(object sender, EventArgs e) + { + Global.Bus + .Send(new SubmitOrderRequest + { + Id = Guid.NewGuid(), + Quantity = Convert.ToInt32(txtQuatity.Text) + }); + } + + public void Handle(SubmitOrderResponse message) + { + lock (Global.Orders) + Global.Orders.Add(message.Order); + } + } +} diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Default.aspx.designer.cs b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Default.aspx.designer.cs new file mode 100644 index 00000000000..ce1c978147b --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Default.aspx.designer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace OrderWebSite { + + + public partial class _Default { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// txtQuatity control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtQuatity; + + /// + /// btnSubmit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSubmit; + + /// + /// OrderList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Repeater OrderList; + } +} diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Global.asax b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Global.asax new file mode 100644 index 00000000000..97e0ad28ae5 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Global.asax @@ -0,0 +1 @@ +<%@ Application Codebehind="Global.asax.cs" Inherits="OrderWebSite.Global" Language="C#" %> diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Global.asax.cs b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Global.asax.cs new file mode 100644 index 00000000000..c0dffc21fb1 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Global.asax.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Web; +using log4net; +using NServiceBus; +using NServiceBus.Config; +using NServiceBus.Integration.Azure; + +namespace OrderWebSite +{ + public class Global : HttpApplication + { + public static IBus Bus; + public static IList Orders; + private static IStartableBus _configure; + + private static readonly Lazy StartBus = new Lazy(ConfigureNServiceBus); + + private static IBus ConfigureNServiceBus() + { + var bus = _configure + .Start(); + + return bus; + } + + protected void Application_Start(object sender, EventArgs e) + { + Orders = new List(); + + + } + + protected void Application_BeginRequest(object sender, EventArgs e) + { + if(_configure == null) + _configure = Configure.WithWeb() + .DefaultBuilder() + .Log4Net(new AzureAppender()) + .AzureConfigurationSource() + .AppFabricQueue() + .JsonSerializer() + .UnicastBus() + .DoNotAutoSubscribe() + .LoadMessageHandlers() + .IsTransactional(true) + .CreateBus(); + + Bus = StartBus.Value; + } + + protected void Application_AuthenticateRequest(object sender, EventArgs e) + { + + } + + protected void Application_Error(object sender, EventArgs e) + { + //get reference to the source of the exception chain + var ex = Server.GetLastError().GetBaseException(); + + LogManager.GetLogger(typeof(Global)).Error(ex.ToString()); + } + + protected void Session_End(object sender, EventArgs e) + { + + } + + protected void Application_End(object sender, EventArgs e) + { + + } + + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/OrderWebSite.csproj b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/OrderWebSite.csproj new file mode 100644 index 00000000000..ec4b3854713 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/OrderWebSite.csproj @@ -0,0 +1,162 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + OrderWebSite + OrderWebSite + v4.0 + + + 4.0 + + false + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\ + TRACE + prompt + 4 + AllRules.ruleset + + + + ..\..\..\..\build\azure\hosting\Common.Logging.dll + + + ..\..\..\..\build\azure\hosting\Iesi.Collections.dll + + + ..\..\..\..\build\azure\hosting\Ionic.Zip.dll + + + False + ..\..\..\..\build\azure\hosting\log4net.dll + + + ..\..\..\..\build\azure\hosting\Microsoft.Practices.ServiceLocation.dll + + + False + ..\..\..\..\build\azure\hosting\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\..\build\azure\hosting\Microsoft.WindowsAzure.ServiceRuntime.dll + + + False + ..\..\..\..\build\azure\hosting\Microsoft.WindowsAzure.StorageClient.dll + + + ..\..\..\..\build\azure\hosting\NHibernate.dll + + + ..\..\..\..\build\azure\hosting\NHibernate.Drivers.Azure.TableStorage.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.dll + + + ..\..\..\..\build\azure\hosting\NServiceBus.Azure.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.Core.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.Hosting.dll + + + ..\..\..\..\build\azure\hosting\NServiceBus.Hosting.Azure.dll + + + ..\..\..\..\build\azure\hosting\NServiceBus.NHibernate.dll + + + + + + + + + + + + + + + Designer + + + + + ASPXCodeBehind + Default.aspx + + + Default.aspx + + + Global.asax + + + + + + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + MyMessages + + + + + + + + + + + + + False + True + 51188 + / + + + False + False + + + False + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Properties/AssemblyInfo.cs b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..e2cf2ae74bf --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderWebSite")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderWebSite")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Web.config b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Web.config new file mode 100644 index 00000000000..54c6de45450 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/OrderWebSite/Web.config @@ -0,0 +1,18 @@ + + + + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/ServiceConfiguration.cscfg b/Samples/Azure/AppFabricQueueFullDuplex/ServiceConfiguration.cscfg new file mode 100644 index 00000000000..70f5d6cacbb --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/ServiceConfiguration.cscfg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/ServiceDefinition.build.csdef b/Samples/Azure/AppFabricQueueFullDuplex/ServiceDefinition.build.csdef new file mode 100644 index 00000000000..1fd9232b9ec --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/ServiceDefinition.build.csdef @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueueFullDuplex/ServiceDefinition.csdef b/Samples/Azure/AppFabricQueueFullDuplex/ServiceDefinition.csdef new file mode 100644 index 00000000000..c5c98ec81e4 --- /dev/null +++ b/Samples/Azure/AppFabricQueueFullDuplex/ServiceDefinition.csdef @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/AppFabricPubSub.ccproj b/Samples/Azure/AppFabricQueuePubSub/AppFabricPubSub.ccproj new file mode 100644 index 00000000000..f57c0f6354c --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/AppFabricPubSub.ccproj @@ -0,0 +1,70 @@ + + + + + Debug + AnyCPU + 1.5.0 + {adcfc6b6-8bf7-4d56-b6a4-f6d221111666} + Library + Properties + AzureService + AzureService + True + AzureService + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + OrderService + {84aca710-e5b3-4a46-b87a-7c12fb2527a8} + True + Worker + OrderService + + + OrderWebSite + {f3798c2c-41dc-407c-9ebe-3f10c1ca9a76} + True + Web + OrderWebSite + + + + + 10.0 + $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\1.5\ + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/AppFabricPubSub.sln b/Samples/Azure/AppFabricQueuePubSub/AppFabricPubSub.sln new file mode 100644 index 00000000000..d6e81147ef5 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/AppFabricPubSub.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{CC5FD16D-436D-48AD-A40C-5A424C6E3E79}") = "AppFabricPubSub", "AppFabricPubSub.ccproj", "{ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderWebSite", "OrderWebSite\OrderWebSite.csproj", "{F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService", "OrderService\OrderService.csproj", "{84ACA710-E5B3-4A46-B87A-7C12FB2527A8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{3871CC9B-235F-4E60-98F7-FEF04DB1201B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.Build.0 = Release|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.Build.0 = Release|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.Build.0 = Release|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/AppFabricPubSub.ccproj b/Samples/Azure/AppFabricQueuePubSub/Backup/AppFabricPubSub.ccproj new file mode 100644 index 00000000000..52cfb880ae7 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/AppFabricPubSub.ccproj @@ -0,0 +1,68 @@ + + + + Debug + AnyCPU + 1.3.0 + {adcfc6b6-8bf7-4d56-b6a4-f6d221111666} + Library + Properties + AzureService + AzureService + True + AzureService + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + OrderService + {84aca710-e5b3-4a46-b87a-7c12fb2527a8} + True + Worker + OrderService + + + OrderWebSite + {f3798c2c-41dc-407c-9ebe-3f10c1ca9a76} + True + Web + OrderWebSite + + + + + $(MSBuildExtensionsPath)\Microsoft\Cloud Service\1.0\Visual Studio 10.0\ + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/AppFabricPubSub.sln b/Samples/Azure/AppFabricQueuePubSub/Backup/AppFabricPubSub.sln new file mode 100644 index 00000000000..d6e81147ef5 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/AppFabricPubSub.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{CC5FD16D-436D-48AD-A40C-5A424C6E3E79}") = "AppFabricPubSub", "AppFabricPubSub.ccproj", "{ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderWebSite", "OrderWebSite\OrderWebSite.csproj", "{F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService", "OrderService\OrderService.csproj", "{84ACA710-E5B3-4A46-B87A-7C12FB2527A8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{3871CC9B-235F-4E60-98F7-FEF04DB1201B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.Build.0 = Release|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.Build.0 = Release|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.Build.0 = Release|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/LoadOrdersMessage.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/LoadOrdersMessage.cs new file mode 100644 index 00000000000..ba9857fe625 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/LoadOrdersMessage.cs @@ -0,0 +1,11 @@ +using System; +using NServiceBus; + +namespace MyMessages +{ + [Serializable] + public class LoadOrdersMessage:IMessage + { + + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/LoadOrdersResponseMessage.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/LoadOrdersResponseMessage.cs new file mode 100644 index 00000000000..1ae483c017b --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/LoadOrdersResponseMessage.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using NServiceBus; + +namespace MyMessages +{ + [Serializable] + public class LoadOrdersResponseMessage : IMessage + { + private List orders; + + public List Orders + { + get + { + if(orders == null) + orders = new List(); + + return orders; + } + set + { + orders = value; + } + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/MyMessages.csproj b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/MyMessages.csproj new file mode 100644 index 00000000000..43698e1ce6b --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/MyMessages.csproj @@ -0,0 +1,98 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + Library + Properties + MyMessages + MyMessages + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/Order.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/Order.cs new file mode 100644 index 00000000000..b6df81ec9fa --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/Order.cs @@ -0,0 +1,44 @@ +using System; + +namespace MyMessages +{ + [Serializable] + public class Order + { + public Guid Id { get; set; } + public OrderStatus Status { get; set; } + + public int Quantity { get; set; } + + + public bool Equals(Order other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return other.Id.Equals(Id); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != typeof (Order)) return false; + return Equals((Order) obj); + } + + public override int GetHashCode() + { + return Id.GetHashCode(); + } + + public static bool operator ==(Order left, Order right) + { + return Equals(left, right); + } + + public static bool operator !=(Order left, Order right) + { + return !Equals(left, right); + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/OrderMessage.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/OrderMessage.cs new file mode 100644 index 00000000000..1bcbd60558e --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/OrderMessage.cs @@ -0,0 +1,12 @@ +using System; +using NServiceBus; + +namespace MyMessages +{ + [Serializable] + public class OrderMessage:IMessage + { + public Guid Id { get; set; } + public int Quantity { get; set; } + } +} diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/OrderStatus.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/OrderStatus.cs new file mode 100644 index 00000000000..2d78e051238 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/OrderStatus.cs @@ -0,0 +1,9 @@ +namespace MyMessages +{ + public enum OrderStatus + { + AwaitingApproval, + Approved, + Pending + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/OrderUpdatedEvent.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/OrderUpdatedEvent.cs new file mode 100644 index 00000000000..067aabcec69 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/OrderUpdatedEvent.cs @@ -0,0 +1,11 @@ +using System; +using NServiceBus; + +namespace MyMessages +{ + [Serializable] + public class OrderUpdatedEvent:IMessage + { + public Order UpdatedOrder{ get; set; } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/Properties/AssemblyInfo.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..3ffd0007b74 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/MyMessages/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MyMessages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyMessages")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("39b14fdb-e9e9-4dab-96e5-919966481923")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/App.config b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/App.config new file mode 100644 index 00000000000..b5f6b852516 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/App.config @@ -0,0 +1,21 @@ + + + +
+ + + + + + + + + + + + + + + + + diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/EndpointConfiguration.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/EndpointConfiguration.cs new file mode 100644 index 00000000000..82ce372a16d --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/EndpointConfiguration.cs @@ -0,0 +1,7 @@ +using NServiceBus; +using NServiceBus.Hosting.Azure.Roles.Handlers; + +namespace OrderService +{ + public class EndpointConfiguration : IConfigureThisEndpoint, AsA_Publisher, ICommunicateThroughAppFabricQueues { } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/EndpointInitialisation.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/EndpointInitialisation.cs new file mode 100644 index 00000000000..99bb258aba5 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/EndpointInitialisation.cs @@ -0,0 +1,12 @@ +using NServiceBus; + +namespace OrderService +{ + public class EndpointInitialisation : IWantCustomInitialization + { + public void Init() + { + Configure.Instance.Configurer.RegisterSingleton(new OrderList()); + } + } +} diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/Host.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/Host.cs new file mode 100644 index 00000000000..2a2f8d372c6 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/Host.cs @@ -0,0 +1,6 @@ +using NServiceBus.Hosting.Azure; + +namespace OrderService +{ + public class Host : RoleEntryPoint{} +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/MessageHandlers/LoadOrdersMessageHandlers.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/MessageHandlers/LoadOrdersMessageHandlers.cs new file mode 100644 index 00000000000..c6f0c86fde2 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/MessageHandlers/LoadOrdersMessageHandlers.cs @@ -0,0 +1,27 @@ +using System.Linq; +using MyMessages; +using NServiceBus; + +namespace OrderService.MessageHandlers +{ + public class LoadOrdersMessageHandlers : IHandleMessages + { + private readonly IBus bus; + private readonly OrderList orders; + + public LoadOrdersMessageHandlers(IBus bus,OrderList orders) + { + this.bus = bus; + this.orders = orders; + } + + public void Handle(LoadOrdersMessage message) + { + var reply = new LoadOrdersResponseMessage + { + Orders = orders.GetCurrentOrders().ToList() + }; + bus.Reply(reply); + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/MessageHandlers/OrderMessageHandler.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/MessageHandlers/OrderMessageHandler.cs new file mode 100644 index 00000000000..c14b84babc6 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/MessageHandlers/OrderMessageHandler.cs @@ -0,0 +1,39 @@ +using System.Threading; +using MyMessages; +using NServiceBus; +using Order=MyMessages.Order; + +namespace OrderService.MessageHandlers +{ + public class OrderMessageHandler : IHandleMessages + { + private readonly IBus bus; + private readonly OrderList orders; + + public OrderMessageHandler(IBus bus, OrderList orders) + { + this.bus = bus; + this.orders = orders; + } + + public void Handle(OrderMessage message) + { + var order = new Order + { + Id = message.Id, + Quantity = message.Quantity + }; + //simulate processing + //Thread.Sleep(4000); + + //simlute business logic + order.Status = message.Quantity < 100 ? OrderStatus.Approved : OrderStatus.AwaitingApproval; + + orders.AddOrder(order); + + //publish update + var orderUpdatedEvent = bus.CreateInstance(x=>x.UpdatedOrder = order); + bus.Publish(orderUpdatedEvent); + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/OrderList.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/OrderList.cs new file mode 100644 index 00000000000..65dc4f5be54 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/OrderList.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; + +using System.Linq; +using MyMessages; + +namespace OrderService +{ + public class OrderList + { + private readonly IList orders; + + public OrderList() + { + //add some orders to simulate "existing orders" + orders = new List + { + new Order {Id = Guid.NewGuid(), Quantity = 20, Status = OrderStatus.Approved}, + new Order {Id = Guid.NewGuid(), Quantity = 300, Status = OrderStatus.Approved} + }; + } + + public void AddOrder(Order order) + { + lock(orders) + orders.Add(order); + } + + public Order UpdateStatus(Order order,OrderStatus newStatus) + { + lock (orders) + { + foreach (var orderToUpdate in orders) + { + if(orderToUpdate.Id == order.Id) + { + orderToUpdate.Status = newStatus; + return orderToUpdate; + } + + } + throw new Exception("Order not found"); + } + + } + + + + public IEnumerable GetOrdersToApprove() + { + lock(orders) + { + return new List(orders.Where(x => x.Status == OrderStatus.AwaitingApproval)); + } + } + + public IEnumerable GetCurrentOrders() + { + lock (orders) + return new List(orders); + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/OrderService.csproj b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/OrderService.csproj new file mode 100644 index 00000000000..312f347a78a --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/OrderService.csproj @@ -0,0 +1,151 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8} + Library + Properties + OrderService + OrderService + v4.0 + 512 + Worker + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\lib\Azure\AppFabric\Microsoft.ServiceBus.dll + True + + + False + ..\..\..\lib\Azure\AppFabric\Microsoft.ServiceBus.Messaging.dll + True + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.ServiceRuntime.dll + True + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.StorageClient.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\build\hosting\NServiceBus.Hosting.dll + + + False + ..\..\..\build\hosting\NServiceBus.Hosting.Azure.dll + + + + + + + + + + + + + + + + + + + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + MyMessages + + + + + Designer + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/Properties/AssemblyInfo.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..77fc28ac62a --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderService/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderService")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderService")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6fdad954-96d7-4733-b5ee-41733ae4f018")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Default.aspx b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Default.aspx new file mode 100644 index 00000000000..6215a4f4b95 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Default.aspx @@ -0,0 +1,58 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="OrderWebSite._Default" %> +<%@ Import Namespace="System.Data" %> + + + + + + +
+
+ Enter quantity: + + +
+
+ Entering a value above 100 will require manager approval (extends the delay 10 seconds)
+ Refresh the page after submitting orders (would of course use Ajax for this in production :) ) +
+ Click here to refresh orderlist +
+
+
+ + + + + + + + + + + + + + + + + +
+ Id + + Quantity + + Status +
+ <%# DataBinder.Eval(Container.DataItem, "Id") %> + + <%# DataBinder.Eval(Container.DataItem, "Quantity") %> + + <%# DataBinder.Eval(Container.DataItem, "Status") %> +
+ +
+
+
+ + diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Default.aspx.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Default.aspx.cs new file mode 100644 index 00000000000..3055c3d6c34 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Default.aspx.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using MyMessages; + +namespace OrderWebSite +{ + public partial class _Default : System.Web.UI.Page + { + + protected void Page_Load(object sender, EventArgs e) + { + Refresh(); + } + + private void Refresh() + { + lock (Global.Orders) + OrderList.DataSource = new List(Global.Orders); + + + OrderList.DataBind(); + } + + protected void btnSubmit_Click(object sender, EventArgs e) + { + var order = new Order + { + Id = Guid.NewGuid(), + Quantity = Convert.ToInt32(txtQuatity.Text), + Status = OrderStatus.Pending + + }; + + Global.Bus.Send(new OrderMessage + { + Id = order.Id, + Quantity = order.Quantity + }); + + lock (Global.Orders) + Global.Orders.Add(order); + + Refresh(); + } + } +} diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Default.aspx.designer.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Default.aspx.designer.cs new file mode 100644 index 00000000000..ce1c978147b --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Default.aspx.designer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace OrderWebSite { + + + public partial class _Default { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// txtQuatity control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtQuatity; + + /// + /// btnSubmit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSubmit; + + /// + /// OrderList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Repeater OrderList; + } +} diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Global.asax b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Global.asax new file mode 100644 index 00000000000..97e0ad28ae5 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Global.asax @@ -0,0 +1 @@ +<%@ Application Codebehind="Global.asax.cs" Inherits="OrderWebSite.Global" Language="C#" %> diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Global.asax.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Global.asax.cs new file mode 100644 index 00000000000..51eed807a8b --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Global.asax.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.Web; +using log4net; +using MyMessages; +using NServiceBus; +using NServiceBus.Config; + +namespace OrderWebSite +{ + public class Global : HttpApplication + { + public static IBus Bus; + public static IList Orders; + private static IStartableBus _configure; + + private static readonly Lazy StartBus = new Lazy(ConfigureNServiceBus); + + private static IBus ConfigureNServiceBus() + { + var bus = _configure + .Start(); + + bus.Send(new LoadOrdersMessage()); + + return bus; + } + + protected void Application_Start(object sender, EventArgs e) + { + Orders = new List(); + + _configure = Configure.WithWeb() + .DefaultBuilder() + //.Log4Net(new AzureAppender()) + .AzureConfigurationSource() + .AppFabricMessageQueue() + .JsonSerializer() + .UnicastBus() + .LoadMessageHandlers() + .IsTransactional(true) + .CreateBus() + ; + } + + protected void Application_BeginRequest(object sender, EventArgs e) + { + Bus = StartBus.Value; + } + + protected void Application_AuthenticateRequest(object sender, EventArgs e) + { + + } + + protected void Application_Error(object sender, EventArgs e) + { + //get reference to the source of the exception chain + var ex = Server.GetLastError().GetBaseException(); + + LogManager.GetLogger(typeof(Global)).Error(ex.ToString()); + } + + protected void Session_End(object sender, EventArgs e) + { + + } + + protected void Application_End(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/MessageHandlers/LoadOrdersResponseMessageHandler.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/MessageHandlers/LoadOrdersResponseMessageHandler.cs new file mode 100644 index 00000000000..78ccdac126a --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/MessageHandlers/LoadOrdersResponseMessageHandler.cs @@ -0,0 +1,14 @@ +using MyMessages; +using NServiceBus; + +namespace OrderWebSite.MessageHandlers +{ + public class LoadOrdersResponseMessageHandler : IHandleMessages + { + public void Handle(LoadOrdersResponseMessage message) + { + lock (Global.Orders) + Global.Orders = message.Orders; + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/MessageHandlers/OrderUpdatedEventHandler.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/MessageHandlers/OrderUpdatedEventHandler.cs new file mode 100644 index 00000000000..ee65ff6541a --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/MessageHandlers/OrderUpdatedEventHandler.cs @@ -0,0 +1,21 @@ +using MyMessages; +using NServiceBus; + +namespace OrderWebSite.MessageHandlers +{ + public class OrderUpdatedEventHandler : IHandleMessages + { + public void Handle(OrderUpdatedEvent message) + { + var order = message.UpdatedOrder; + + lock (Global.Orders) + { + if (Global.Orders.Contains(order)) + Global.Orders.Remove(order); + + Global.Orders.Add(order); + } + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/OrderWebSite.csproj b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/OrderWebSite.csproj new file mode 100644 index 00000000000..8c4bb2bcc36 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/OrderWebSite.csproj @@ -0,0 +1,142 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + OrderWebSite + OrderWebSite + v4.0 + + + 4.0 + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\lib\Azure\AppFabric\Microsoft.ServiceBus.dll + True + + + False + ..\..\..\lib\Azure\AppFabric\Microsoft.ServiceBus.Messaging.dll + True + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.ServiceRuntime.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.StorageClient.dll + + + False + ..\..\..\build\hosting\NServiceBus.dll + + + False + ..\..\..\build\hosting\NServiceBus.Core.dll + + + + + + + + + + + + + + + Designer + + + + + ASPXCodeBehind + Default.aspx + + + Default.aspx + + + Global.asax + + + + + + + + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + MyMessages + + + + + + + + + + + + + False + False + 8089 + / + + + False + False + + + False + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Properties/AssemblyInfo.cs b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..e2cf2ae74bf --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderWebSite")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderWebSite")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Web.config b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Web.config new file mode 100644 index 00000000000..49a90256baf --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/OrderWebSite/Web.config @@ -0,0 +1,18 @@ + + + +
+ + + + + + + + + + + + + + diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/ServiceConfiguration.cscfg b/Samples/Azure/AppFabricQueuePubSub/Backup/ServiceConfiguration.cscfg new file mode 100644 index 00000000000..a96054caf45 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/ServiceConfiguration.cscfg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/Backup/ServiceDefinition.csdef b/Samples/Azure/AppFabricQueuePubSub/Backup/ServiceDefinition.csdef new file mode 100644 index 00000000000..80486c212ca --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/Backup/ServiceDefinition.csdef @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/MyMessages/LoadOrdersMessage.cs b/Samples/Azure/AppFabricQueuePubSub/MyMessages/LoadOrdersMessage.cs new file mode 100644 index 00000000000..ba9857fe625 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/MyMessages/LoadOrdersMessage.cs @@ -0,0 +1,11 @@ +using System; +using NServiceBus; + +namespace MyMessages +{ + [Serializable] + public class LoadOrdersMessage:IMessage + { + + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/MyMessages/LoadOrdersResponseMessage.cs b/Samples/Azure/AppFabricQueuePubSub/MyMessages/LoadOrdersResponseMessage.cs new file mode 100644 index 00000000000..1ae483c017b --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/MyMessages/LoadOrdersResponseMessage.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using NServiceBus; + +namespace MyMessages +{ + [Serializable] + public class LoadOrdersResponseMessage : IMessage + { + private List orders; + + public List Orders + { + get + { + if(orders == null) + orders = new List(); + + return orders; + } + set + { + orders = value; + } + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/MyMessages/MyMessages.csproj b/Samples/Azure/AppFabricQueuePubSub/MyMessages/MyMessages.csproj new file mode 100644 index 00000000000..3f54133ed4b --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/MyMessages/MyMessages.csproj @@ -0,0 +1,98 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + Library + Properties + MyMessages + MyMessages + v4.0 + 512 + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.dll + + + + + + + + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/MyMessages/Order.cs b/Samples/Azure/AppFabricQueuePubSub/MyMessages/Order.cs new file mode 100644 index 00000000000..b6df81ec9fa --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/MyMessages/Order.cs @@ -0,0 +1,44 @@ +using System; + +namespace MyMessages +{ + [Serializable] + public class Order + { + public Guid Id { get; set; } + public OrderStatus Status { get; set; } + + public int Quantity { get; set; } + + + public bool Equals(Order other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return other.Id.Equals(Id); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != typeof (Order)) return false; + return Equals((Order) obj); + } + + public override int GetHashCode() + { + return Id.GetHashCode(); + } + + public static bool operator ==(Order left, Order right) + { + return Equals(left, right); + } + + public static bool operator !=(Order left, Order right) + { + return !Equals(left, right); + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/MyMessages/OrderMessage.cs b/Samples/Azure/AppFabricQueuePubSub/MyMessages/OrderMessage.cs new file mode 100644 index 00000000000..1bcbd60558e --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/MyMessages/OrderMessage.cs @@ -0,0 +1,12 @@ +using System; +using NServiceBus; + +namespace MyMessages +{ + [Serializable] + public class OrderMessage:IMessage + { + public Guid Id { get; set; } + public int Quantity { get; set; } + } +} diff --git a/Samples/Azure/AppFabricQueuePubSub/MyMessages/OrderStatus.cs b/Samples/Azure/AppFabricQueuePubSub/MyMessages/OrderStatus.cs new file mode 100644 index 00000000000..2d78e051238 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/MyMessages/OrderStatus.cs @@ -0,0 +1,9 @@ +namespace MyMessages +{ + public enum OrderStatus + { + AwaitingApproval, + Approved, + Pending + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/MyMessages/OrderUpdatedEvent.cs b/Samples/Azure/AppFabricQueuePubSub/MyMessages/OrderUpdatedEvent.cs new file mode 100644 index 00000000000..067aabcec69 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/MyMessages/OrderUpdatedEvent.cs @@ -0,0 +1,11 @@ +using System; +using NServiceBus; + +namespace MyMessages +{ + [Serializable] + public class OrderUpdatedEvent:IMessage + { + public Order UpdatedOrder{ get; set; } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/MyMessages/Properties/AssemblyInfo.cs b/Samples/Azure/AppFabricQueuePubSub/MyMessages/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..3ffd0007b74 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/MyMessages/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MyMessages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyMessages")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("39b14fdb-e9e9-4dab-96e5-919966481923")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderService/App.config b/Samples/Azure/AppFabricQueuePubSub/OrderService/App.config new file mode 100644 index 00000000000..b5f6b852516 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderService/App.config @@ -0,0 +1,21 @@ + + + +
+ + + + + + + + + + + + + + + + + diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderService/EndpointConfiguration.cs b/Samples/Azure/AppFabricQueuePubSub/OrderService/EndpointConfiguration.cs new file mode 100644 index 00000000000..ec54b6ce114 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderService/EndpointConfiguration.cs @@ -0,0 +1,7 @@ +using NServiceBus; +using NServiceBus.Hosting.Azure.Roles.Handlers; + +namespace OrderService +{ + public class EndpointConfiguration : IConfigureThisEndpoint, AsA_Worker { } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderService/EndpointInitialisation.cs b/Samples/Azure/AppFabricQueuePubSub/OrderService/EndpointInitialisation.cs new file mode 100644 index 00000000000..99bb258aba5 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderService/EndpointInitialisation.cs @@ -0,0 +1,12 @@ +using NServiceBus; + +namespace OrderService +{ + public class EndpointInitialisation : IWantCustomInitialization + { + public void Init() + { + Configure.Instance.Configurer.RegisterSingleton(new OrderList()); + } + } +} diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderService/Host.cs b/Samples/Azure/AppFabricQueuePubSub/OrderService/Host.cs new file mode 100644 index 00000000000..2a2f8d372c6 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderService/Host.cs @@ -0,0 +1,6 @@ +using NServiceBus.Hosting.Azure; + +namespace OrderService +{ + public class Host : RoleEntryPoint{} +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderService/MessageHandlers/LoadOrdersMessageHandlers.cs b/Samples/Azure/AppFabricQueuePubSub/OrderService/MessageHandlers/LoadOrdersMessageHandlers.cs new file mode 100644 index 00000000000..c6f0c86fde2 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderService/MessageHandlers/LoadOrdersMessageHandlers.cs @@ -0,0 +1,27 @@ +using System.Linq; +using MyMessages; +using NServiceBus; + +namespace OrderService.MessageHandlers +{ + public class LoadOrdersMessageHandlers : IHandleMessages + { + private readonly IBus bus; + private readonly OrderList orders; + + public LoadOrdersMessageHandlers(IBus bus,OrderList orders) + { + this.bus = bus; + this.orders = orders; + } + + public void Handle(LoadOrdersMessage message) + { + var reply = new LoadOrdersResponseMessage + { + Orders = orders.GetCurrentOrders().ToList() + }; + bus.Reply(reply); + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderService/MessageHandlers/OrderMessageHandler.cs b/Samples/Azure/AppFabricQueuePubSub/OrderService/MessageHandlers/OrderMessageHandler.cs new file mode 100644 index 00000000000..c14b84babc6 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderService/MessageHandlers/OrderMessageHandler.cs @@ -0,0 +1,39 @@ +using System.Threading; +using MyMessages; +using NServiceBus; +using Order=MyMessages.Order; + +namespace OrderService.MessageHandlers +{ + public class OrderMessageHandler : IHandleMessages + { + private readonly IBus bus; + private readonly OrderList orders; + + public OrderMessageHandler(IBus bus, OrderList orders) + { + this.bus = bus; + this.orders = orders; + } + + public void Handle(OrderMessage message) + { + var order = new Order + { + Id = message.Id, + Quantity = message.Quantity + }; + //simulate processing + //Thread.Sleep(4000); + + //simlute business logic + order.Status = message.Quantity < 100 ? OrderStatus.Approved : OrderStatus.AwaitingApproval; + + orders.AddOrder(order); + + //publish update + var orderUpdatedEvent = bus.CreateInstance(x=>x.UpdatedOrder = order); + bus.Publish(orderUpdatedEvent); + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderService/OrderList.cs b/Samples/Azure/AppFabricQueuePubSub/OrderService/OrderList.cs new file mode 100644 index 00000000000..65dc4f5be54 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderService/OrderList.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; + +using System.Linq; +using MyMessages; + +namespace OrderService +{ + public class OrderList + { + private readonly IList orders; + + public OrderList() + { + //add some orders to simulate "existing orders" + orders = new List + { + new Order {Id = Guid.NewGuid(), Quantity = 20, Status = OrderStatus.Approved}, + new Order {Id = Guid.NewGuid(), Quantity = 300, Status = OrderStatus.Approved} + }; + } + + public void AddOrder(Order order) + { + lock(orders) + orders.Add(order); + } + + public Order UpdateStatus(Order order,OrderStatus newStatus) + { + lock (orders) + { + foreach (var orderToUpdate in orders) + { + if(orderToUpdate.Id == order.Id) + { + orderToUpdate.Status = newStatus; + return orderToUpdate; + } + + } + throw new Exception("Order not found"); + } + + } + + + + public IEnumerable GetOrdersToApprove() + { + lock(orders) + { + return new List(orders.Where(x => x.Status == OrderStatus.AwaitingApproval)); + } + } + + public IEnumerable GetCurrentOrders() + { + lock (orders) + return new List(orders); + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderService/OrderService.csproj b/Samples/Azure/AppFabricQueuePubSub/OrderService/OrderService.csproj new file mode 100644 index 00000000000..4ef8dc30a25 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderService/OrderService.csproj @@ -0,0 +1,164 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8} + Library + Properties + OrderService + OrderService + v4.0 + 512 + Worker + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + ..\..\..\..\build\azure\hosting\Common.Logging.dll + + + ..\..\..\..\build\azure\hosting\Iesi.Collections.dll + + + ..\..\..\..\build\azure\hosting\Ionic.Zip.dll + + + False + ..\..\..\..\build\azure\hosting\log4net.dll + + + ..\..\..\..\build\azure\hosting\Microsoft.Practices.ServiceLocation.dll + + + False + ..\..\..\..\build\azure\hosting\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\..\build\azure\hosting\Microsoft.WindowsAzure.ServiceRuntime.dll + + + False + ..\..\..\..\build\azure\hosting\Microsoft.WindowsAzure.StorageClient.dll + + + ..\..\..\..\build\azure\hosting\NHibernate.dll + + + ..\..\..\..\build\azure\hosting\NHibernate.Drivers.Azure.TableStorage.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.dll + + + ..\..\..\..\build\azure\hosting\NServiceBus.Azure.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.Core.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.Hosting.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.Hosting.Azure.dll + + + ..\..\..\..\build\azure\hosting\NServiceBus.NHibernate.dll + + + + + + + + + + + + + + + + + + + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + MyMessages + + + + + Designer + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderService/Properties/AssemblyInfo.cs b/Samples/Azure/AppFabricQueuePubSub/OrderService/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..77fc28ac62a --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderService/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderService")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderService")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6fdad954-96d7-4733-b5ee-41733ae4f018")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderService/WorkerRole.cs b/Samples/Azure/AppFabricQueuePubSub/OrderService/WorkerRole.cs new file mode 100644 index 00000000000..34da24466f9 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderService/WorkerRole.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections.Specialized; +using System.Threading; +using Common.Logging; +using log4net.Core; +using Microsoft.WindowsAzure.ServiceRuntime; +using MyMessages; +using NServiceBus; +using NServiceBus.Config; +using NServiceBus.Integration.Azure; + +namespace OrderService +{ + public class WorkerRole : RoleEntryPoint + { + public IBus Bus; + + public OrderList Orders = new OrderList(); + private ILog logger; + + public override void Run() + { + ConfigureLogging(); + + logger.Info("Starting order worker with instance id:" + RoleEnvironment.CurrentRoleInstance.Id); + + ConfigureNServiceBus(); + + while (true) + { + Thread.Sleep(10000); + + logger.Info("Approving orders"); + + foreach (var order in Orders.GetOrdersToApprove()) + { + var updatedOrder = Orders.UpdateStatus(order, OrderStatus.Approved); + + //publish update + var orderUpdatedEvent = Bus.CreateInstance(x => x.UpdatedOrder = updatedOrder); + Bus.Publish(orderUpdatedEvent); + } + } + } + + private void ConfigureNServiceBus() + { + + logger.Info("Initalizing NServiceBus"); + try + { + var config = Configure.With() + .SpringBuilder() + .AzureConfigurationSource() + .XmlSerializer() + .UnicastBus() + .LoadMessageHandlers() + .AzureQueuesTransport() + .IsTransactional(true) + .PurgeOnStartup(false) + .InMemorySubscriptionStorage();//we use inmemory storage until we have a sub storage for TableStorage or SQL Services + + Configure.Instance.Configurer.RegisterSingleton(Orders); + + Bus = config.CreateBus() + .Start(); + + } + catch (Exception ex) + { + logger.Error(ex); + throw; + } + + logger.Info("NServiceBus started"); + + } + + + private void ConfigureLogging() + { + LogManager.Adapter = new Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter(new NameValueCollection + { + {"configType","EXTERNAL"} + }); + + var appender = new AzureAppender + { + ConnectionStringKey = "AzureQueueConfig.ConnectionString", + Threshold = Level.Debug + }; + appender.ActivateOptions(); + + log4net.Config.BasicConfigurator.Configure(appender); + + logger = LogManager.GetLogger(typeof(WorkerRole)); + } + } +} diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Default.aspx b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Default.aspx new file mode 100644 index 00000000000..6215a4f4b95 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Default.aspx @@ -0,0 +1,58 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="OrderWebSite._Default" %> +<%@ Import Namespace="System.Data" %> + + + + + + +
+
+ Enter quantity: + + +
+
+ Entering a value above 100 will require manager approval (extends the delay 10 seconds)
+ Refresh the page after submitting orders (would of course use Ajax for this in production :) ) +
+ Click here to refresh orderlist +
+
+
+ + + + + + + + + + + + + + + + + +
+ Id + + Quantity + + Status +
+ <%# DataBinder.Eval(Container.DataItem, "Id") %> + + <%# DataBinder.Eval(Container.DataItem, "Quantity") %> + + <%# DataBinder.Eval(Container.DataItem, "Status") %> +
+ +
+
+
+ + diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Default.aspx.cs b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Default.aspx.cs new file mode 100644 index 00000000000..3055c3d6c34 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Default.aspx.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using MyMessages; + +namespace OrderWebSite +{ + public partial class _Default : System.Web.UI.Page + { + + protected void Page_Load(object sender, EventArgs e) + { + Refresh(); + } + + private void Refresh() + { + lock (Global.Orders) + OrderList.DataSource = new List(Global.Orders); + + + OrderList.DataBind(); + } + + protected void btnSubmit_Click(object sender, EventArgs e) + { + var order = new Order + { + Id = Guid.NewGuid(), + Quantity = Convert.ToInt32(txtQuatity.Text), + Status = OrderStatus.Pending + + }; + + Global.Bus.Send(new OrderMessage + { + Id = order.Id, + Quantity = order.Quantity + }); + + lock (Global.Orders) + Global.Orders.Add(order); + + Refresh(); + } + } +} diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Default.aspx.designer.cs b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Default.aspx.designer.cs new file mode 100644 index 00000000000..ce1c978147b --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Default.aspx.designer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace OrderWebSite { + + + public partial class _Default { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// txtQuatity control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtQuatity; + + /// + /// btnSubmit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSubmit; + + /// + /// OrderList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Repeater OrderList; + } +} diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Global.asax b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Global.asax new file mode 100644 index 00000000000..97e0ad28ae5 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Global.asax @@ -0,0 +1 @@ +<%@ Application Codebehind="Global.asax.cs" Inherits="OrderWebSite.Global" Language="C#" %> diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Global.asax.cs b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Global.asax.cs new file mode 100644 index 00000000000..fd9303022e2 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Global.asax.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Web; +using NServiceBus.Integration.Azure; +using log4net; +using MyMessages; +using NServiceBus; +using NServiceBus.Config; + +namespace OrderWebSite +{ + public class Global : HttpApplication + { + public static IBus Bus; + public static IList Orders; + + private static readonly Lazy StartBus = new Lazy(ConfigureNServiceBus); + + private static IBus ConfigureNServiceBus() + { + var bus = Configure.WithWeb() + .DefaultBuilder() + .Log4Net(new AzureAppender()) + .AzureConfigurationSource() + .AppFabricQueue() + .JsonSerializer() + .UnicastBus() + .LoadMessageHandlers() + .IsTransactional(true) + .CreateBus() + .Start(); + + bus.Send(new LoadOrdersMessage()); + + return bus; + } + + protected void Application_Start(object sender, EventArgs e) + { + Orders = new List(); + } + + protected void Application_BeginRequest(object sender, EventArgs e) + { + Bus = StartBus.Value; + } + + protected void Application_AuthenticateRequest(object sender, EventArgs e) + { + + } + + protected void Application_Error(object sender, EventArgs e) + { + //get reference to the source of the exception chain + var ex = Server.GetLastError().GetBaseException(); + + LogManager.GetLogger(typeof(Global)).Error(ex.ToString()); + } + + protected void Session_End(object sender, EventArgs e) + { + + } + + protected void Application_End(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/MessageHandlers/LoadOrdersResponseMessageHandler.cs b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/MessageHandlers/LoadOrdersResponseMessageHandler.cs new file mode 100644 index 00000000000..78ccdac126a --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/MessageHandlers/LoadOrdersResponseMessageHandler.cs @@ -0,0 +1,14 @@ +using MyMessages; +using NServiceBus; + +namespace OrderWebSite.MessageHandlers +{ + public class LoadOrdersResponseMessageHandler : IHandleMessages + { + public void Handle(LoadOrdersResponseMessage message) + { + lock (Global.Orders) + Global.Orders = message.Orders; + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/MessageHandlers/OrderUpdatedEventHandler.cs b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/MessageHandlers/OrderUpdatedEventHandler.cs new file mode 100644 index 00000000000..ee65ff6541a --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/MessageHandlers/OrderUpdatedEventHandler.cs @@ -0,0 +1,21 @@ +using MyMessages; +using NServiceBus; + +namespace OrderWebSite.MessageHandlers +{ + public class OrderUpdatedEventHandler : IHandleMessages + { + public void Handle(OrderUpdatedEvent message) + { + var order = message.UpdatedOrder; + + lock (Global.Orders) + { + if (Global.Orders.Contains(order)) + Global.Orders.Remove(order); + + Global.Orders.Add(order); + } + } + } +} \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/OrderWebSite.csproj b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/OrderWebSite.csproj new file mode 100644 index 00000000000..3564e904f4c --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/OrderWebSite.csproj @@ -0,0 +1,154 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + OrderWebSite + OrderWebSite + v4.0 + + + 4.0 + + false + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\ + TRACE + prompt + 4 + AllRules.ruleset + + + + ..\..\..\..\build\azure\hosting\Common.Logging.dll + + + ..\..\..\..\build\azure\hosting\Iesi.Collections.dll + + + False + ..\..\..\..\build\azure\hosting\log4net.dll + + + ..\..\..\..\build\azure\hosting\Microsoft.Practices.ServiceLocation.dll + + + False + ..\..\..\..\build\azure\hosting\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\..\build\azure\hosting\Microsoft.WindowsAzure.ServiceRuntime.dll + + + False + ..\..\..\..\build\azure\hosting\Microsoft.WindowsAzure.StorageClient.dll + + + ..\..\..\..\build\azure\hosting\NHibernate.dll + + + ..\..\..\..\build\azure\hosting\NHibernate.Drivers.Azure.TableStorage.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.dll + + + ..\..\..\..\build\azure\hosting\NServiceBus.Azure.dll + + + False + ..\..\..\..\build\azure\hosting\NServiceBus.Core.dll + + + ..\..\..\..\build\azure\hosting\NServiceBus.NHibernate.dll + + + + + + + + + + + + + + + Designer + + + + + ASPXCodeBehind + Default.aspx + + + Default.aspx + + + Global.asax + + + + + + + + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + MyMessages + + + + + + + + + + + + + False + False + 8089 + / + + + False + False + + + False + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Properties/AssemblyInfo.cs b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..e2cf2ae74bf --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderWebSite")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderWebSite")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Web.config b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Web.config new file mode 100644 index 00000000000..49a90256baf --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/OrderWebSite/Web.config @@ -0,0 +1,18 @@ + + + +
+ + + + + + + + + + + + + + diff --git a/Samples/Azure/AppFabricQueuePubSub/ServiceConfiguration.cscfg b/Samples/Azure/AppFabricQueuePubSub/ServiceConfiguration.cscfg new file mode 100644 index 00000000000..0e6d8d6fd21 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/ServiceConfiguration.cscfg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/ServiceDefinition.build.csdef b/Samples/Azure/AppFabricQueuePubSub/ServiceDefinition.build.csdef new file mode 100644 index 00000000000..81aff1c0561 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/ServiceDefinition.build.csdef @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Azure/AppFabricQueuePubSub/ServiceDefinition.csdef b/Samples/Azure/AppFabricQueuePubSub/ServiceDefinition.csdef new file mode 100644 index 00000000000..322ba039a12 --- /dev/null +++ b/Samples/Azure/AppFabricQueuePubSub/ServiceDefinition.csdef @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Azure/AzureFullDuplex/OrderWebSite/Global.asax.cs b/Samples/Azure/AzureFullDuplex/OrderWebSite/Global.asax.cs index fd1da0a6c26..31e798b0cb0 100644 --- a/Samples/Azure/AzureFullDuplex/OrderWebSite/Global.asax.cs +++ b/Samples/Azure/AzureFullDuplex/OrderWebSite/Global.asax.cs @@ -18,7 +18,18 @@ public class Global : HttpApplication private static IBus ConfigureNServiceBus() { - var bus = _configure + var bus = Configure.WithWeb() + .DefaultBuilder() + .Log4Net(new AzureAppender()) + .AzureConfigurationSource() + .AzureMessageQueue() + .JsonSerializer() + .QueuePerInstance() + .PurgeOnStartup(true) + .UnicastBus() + .LoadMessageHandlers() + .IsTransactional(true) + .CreateBus() .Start(); return bus; @@ -31,20 +42,6 @@ protected void Application_Start(object sender, EventArgs e) protected void Application_BeginRequest(object sender, EventArgs e) { - if(_configure == null) - _configure = Configure.WithWeb() - .DefaultBuilder() - .Log4Net(new AzureAppender()) - .AzureConfigurationSource() - .AzureMessageQueue() - .JsonSerializer() - .QueuePerInstance() - .PurgeOnStartup(true) - .UnicastBus() - .LoadMessageHandlers() - .IsTransactional(true) - .CreateBus(); - Bus = StartBus.Value; } diff --git a/Samples/Azure/AzureFullDuplex/ServiceConfiguration.cscfg b/Samples/Azure/AzureFullDuplex/ServiceConfiguration.cscfg index 6bdc1908231..db70861b854 100644 --- a/Samples/Azure/AzureFullDuplex/ServiceConfiguration.cscfg +++ b/Samples/Azure/AzureFullDuplex/ServiceConfiguration.cscfg @@ -4,7 +4,6 @@ - @@ -19,12 +18,11 @@ - + - diff --git a/Samples/Azure/AzureFullDuplex/ServiceDefinition.build.csdef b/Samples/Azure/AzureFullDuplex/ServiceDefinition.build.csdef index cc06cbf55a7..3800a496c71 100644 --- a/Samples/Azure/AzureFullDuplex/ServiceDefinition.build.csdef +++ b/Samples/Azure/AzureFullDuplex/ServiceDefinition.build.csdef @@ -19,7 +19,6 @@ - @@ -40,7 +39,6 @@ - diff --git a/Samples/Azure/AzureFullDuplex/ServiceDefinition.csdef b/Samples/Azure/AzureFullDuplex/ServiceDefinition.csdef index f8fee760421..b3976268e27 100644 --- a/Samples/Azure/AzureFullDuplex/ServiceDefinition.csdef +++ b/Samples/Azure/AzureFullDuplex/ServiceDefinition.csdef @@ -10,7 +10,6 @@ - @@ -31,7 +30,6 @@ - diff --git a/Samples/Azure/AzureHost/AzureHost/ServiceDefinition.build.csdef b/Samples/Azure/AzureHost/AzureHost/ServiceDefinition.build.csdef index 3d960fc9833..6355c51e61b 100644 --- a/Samples/Azure/AzureHost/AzureHost/ServiceDefinition.build.csdef +++ b/Samples/Azure/AzureHost/AzureHost/ServiceDefinition.build.csdef @@ -35,7 +35,7 @@ - + \ No newline at end of file diff --git a/Samples/Azure/AzureHost/AzureHost/ServiceDefinition.csdef b/Samples/Azure/AzureHost/AzureHost/ServiceDefinition.csdef index 27fb864d921..71fb9b86249 100644 --- a/Samples/Azure/AzureHost/AzureHost/ServiceDefinition.csdef +++ b/Samples/Azure/AzureHost/AzureHost/ServiceDefinition.csdef @@ -27,7 +27,7 @@ - + \ No newline at end of file diff --git a/Samples/Azure/AzureHost/Worker/App.config b/Samples/Azure/AzureHost/Worker/App.config index 185c869169b..c0148ab9997 100644 --- a/Samples/Azure/AzureHost/Worker/App.config +++ b/Samples/Azure/AzureHost/Worker/App.config @@ -12,8 +12,8 @@ - - + + diff --git a/Samples/Azure/AzurePubSub/ServiceConfiguration.cscfg b/Samples/Azure/AzurePubSub/ServiceConfiguration.cscfg index 960d9c8abfd..1056582aff2 100644 --- a/Samples/Azure/AzurePubSub/ServiceConfiguration.cscfg +++ b/Samples/Azure/AzurePubSub/ServiceConfiguration.cscfg @@ -4,7 +4,6 @@ - @@ -25,8 +24,7 @@ - - + diff --git a/Samples/Azure/AzurePubSub/ServiceDefinition.build.csdef b/Samples/Azure/AzurePubSub/ServiceDefinition.build.csdef index 446098c1b6a..055fbe3f977 100644 --- a/Samples/Azure/AzurePubSub/ServiceDefinition.build.csdef +++ b/Samples/Azure/AzurePubSub/ServiceDefinition.build.csdef @@ -19,7 +19,6 @@ - diff --git a/Samples/Azure/AzurePubSub/ServiceDefinition.csdef b/Samples/Azure/AzurePubSub/ServiceDefinition.csdef index 3a040b20462..50dde5b8cb5 100644 --- a/Samples/Azure/AzurePubSub/ServiceDefinition.csdef +++ b/Samples/Azure/AzurePubSub/ServiceDefinition.csdef @@ -10,7 +10,6 @@ - diff --git a/Samples/Azure/AzureSagas/Barista/Barista.csproj b/Samples/Azure/AzureSagas/Barista/Barista.csproj index 05debe73675..edb6b1f7e62 100644 --- a/Samples/Azure/AzureSagas/Barista/Barista.csproj +++ b/Samples/Azure/AzureSagas/Barista/Barista.csproj @@ -69,9 +69,9 @@ False ..\..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll - + False - ..\..\..\..\binaries\containers\structuremap\StructureMap.dll + ..\..\..\..\packages\structuremap.2.6.3\lib\StructureMap.dll diff --git a/Samples/Azure/AzureSagas/Barista/BaristaMessageHandler.cs b/Samples/Azure/AzureSagas/Barista/BaristaMessageHandler.cs index 02af3917f0b..cdce7de3d11 100644 --- a/Samples/Azure/AzureSagas/Barista/BaristaMessageHandler.cs +++ b/Samples/Azure/AzureSagas/Barista/BaristaMessageHandler.cs @@ -66,7 +66,10 @@ private void DeliverOrder() var viewData = new DeliverOrderView(Data.Drink, Data.Size); _view.DeliverOrder(viewData); - Bus.Send(new OrderReadyMessage(Data.CustomerName, Data.Drink)); + var reply = Bus.CreateInstance(); + reply.Drink = Data.Drink; + reply.CustomerName = Data.CustomerName; + Bus.Send(reply); MarkAsComplete(); } diff --git a/Samples/Azure/AzureSagas/Cashier/Cashier.csproj b/Samples/Azure/AzureSagas/Cashier/Cashier.csproj index 488ebfc6dcb..28a6a2fafcd 100644 --- a/Samples/Azure/AzureSagas/Cashier/Cashier.csproj +++ b/Samples/Azure/AzureSagas/Cashier/Cashier.csproj @@ -71,9 +71,9 @@ False ..\..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll - + False - ..\..\..\..\binaries\containers\structuremap\StructureMap.dll + ..\..\..\..\packages\structuremap.2.6.3\lib\StructureMap.dll diff --git a/Samples/Azure/AzureSagas/Cashier/CashierMessageHandler.cs b/Samples/Azure/AzureSagas/Cashier/CashierMessageHandler.cs index a8de9134f71..bb9e6cef242 100644 --- a/Samples/Azure/AzureSagas/Cashier/CashierMessageHandler.cs +++ b/Samples/Azure/AzureSagas/Cashier/CashierMessageHandler.cs @@ -37,8 +37,19 @@ public void Handle(NewOrderMessage message) Data.CustomerName = message.CustomerName; Data.Amount = CalculateAmountAccordingTo(message.DrinkSize); - Bus.Publish(new PrepareOrderMessage(Data.CustomerName, Data.Drink, Data.DrinkSize, Data.OrderId)); - Bus.Reply(new PaymentRequestMessage(Data.Amount, message.CustomerName, message.OrderId)); + var prepareOrder = Bus.CreateInstance(); + prepareOrder.CustomerName = Data.CustomerName; + prepareOrder.Drink = Data.Drink; + prepareOrder.DrinkSize = Data.DrinkSize; + prepareOrder.OrderId = Data.OrderId; + + var paymentRequest = Bus.CreateInstance(); + paymentRequest.OrderId = message.OrderId; + paymentRequest.CustomerName = message.CustomerName; + paymentRequest.Amount = Data.Amount; + + Bus.Publish(prepareOrder); + Bus.Reply(paymentRequest); } public void Handle(PaymentMessage message) @@ -53,7 +64,9 @@ public void Handle(PaymentMessage message) var viewData = new ReceivedFullPaymentView(Data.CustomerName, Data.Drink, Data.DrinkSize); _view.ReceivedFullPayment(viewData); - Bus.Publish(new PaymentCompleteMessage(Data.OrderId)); + var paymentCompleteMessage = Bus.CreateInstance(); + paymentCompleteMessage.OrderId = Data.OrderId; + Bus.Publish(paymentCompleteMessage); } MarkAsComplete(); diff --git a/Samples/Azure/AzureSagas/CashierContracts/NewOrderMessage.cs b/Samples/Azure/AzureSagas/CashierContracts/NewOrderMessage.cs index c794b4c1f59..620e7d00b9d 100644 --- a/Samples/Azure/AzureSagas/CashierContracts/NewOrderMessage.cs +++ b/Samples/Azure/AzureSagas/CashierContracts/NewOrderMessage.cs @@ -12,6 +12,7 @@ public class NewOrderMessage : IMessage public NewOrderMessage() { + OrderId = Guid.NewGuid(); } public NewOrderMessage(String customerName, String drink, DrinkSize drinkSize) diff --git a/Samples/Azure/AzureSagas/Customer/Customer.csproj b/Samples/Azure/AzureSagas/Customer/Customer.csproj index fb233f96ec3..d21d8606b01 100644 --- a/Samples/Azure/AzureSagas/Customer/Customer.csproj +++ b/Samples/Azure/AzureSagas/Customer/Customer.csproj @@ -71,9 +71,9 @@ False ..\..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll - + False - ..\..\..\..\binaries\containers\structuremap\StructureMap.dll + ..\..\..\..\packages\structuremap.2.6.3\lib\StructureMap.dll diff --git a/Samples/Azure/AzureSagas/Customer/CustomerOrder.cs b/Samples/Azure/AzureSagas/Customer/CustomerOrder.cs index 1e575203163..9342ddd526e 100644 --- a/Samples/Azure/AzureSagas/Customer/CustomerOrder.cs +++ b/Samples/Azure/AzureSagas/Customer/CustomerOrder.cs @@ -24,7 +24,10 @@ private void OrderButton_Click(Object sender, EventArgs e) var drink = DrinkComboBox.Text; var drinkSize = (DrinkSize) Enum.Parse(typeof(DrinkSize), SizeComboBox.Text); - var newOrder = new NewOrderMessage(customerName, drink, drinkSize); + var newOrder = _bus.CreateInstance(); + newOrder.CustomerName = customerName; + newOrder.Drink = drink; + newOrder.DrinkSize = drinkSize; _bus.Send(newOrder); } @@ -34,7 +37,11 @@ private void OrderButton_Click(Object sender, EventArgs e) var result = MessageBox.Show(text, "Request payment", MessageBoxButtons.YesNo); var amount = (DialogResult.Yes == result) ? message.Amount : 0.0; - _bus.Reply(new PaymentMessage(amount, message.OrderId)); + var payment = _bus.CreateInstance(); + payment.Amount = amount; + payment.OrderId = message.OrderId; + + _bus.Reply(payment); } public new void Handle(OrderReadyMessage message) diff --git a/Samples/Azure/AzureSagas/TimeoutManager/TimeoutManager.csproj b/Samples/Azure/AzureSagas/TimeoutManager/TimeoutManager.csproj index a15698282e5..07f75ae2c08 100644 --- a/Samples/Azure/AzureSagas/TimeoutManager/TimeoutManager.csproj +++ b/Samples/Azure/AzureSagas/TimeoutManager/TimeoutManager.csproj @@ -76,8 +76,9 @@ ..\..\..\..\build\azure\timeout\NServiceBus.Timeout.Hosting.Azure.dll - - ..\..\..\..\binaries\containers\structuremap\StructureMap.dll + + False + ..\..\..\..\packages\structuremap.2.6.3\lib\StructureMap.dll diff --git a/Samples/Azure/AzureThumbnailCreator/ServiceConfiguration.cscfg b/Samples/Azure/AzureThumbnailCreator/ServiceConfiguration.cscfg index 14fa3c53956..52b7233eca9 100644 --- a/Samples/Azure/AzureThumbnailCreator/ServiceConfiguration.cscfg +++ b/Samples/Azure/AzureThumbnailCreator/ServiceConfiguration.cscfg @@ -6,7 +6,6 @@ - @@ -21,7 +20,7 @@ - + diff --git a/Samples/Azure/AzureThumbnailCreator/ServiceDefinition.build.csdef b/Samples/Azure/AzureThumbnailCreator/ServiceDefinition.build.csdef index 476d0c71abc..b38ee29b240 100644 --- a/Samples/Azure/AzureThumbnailCreator/ServiceDefinition.build.csdef +++ b/Samples/Azure/AzureThumbnailCreator/ServiceDefinition.build.csdef @@ -20,7 +20,6 @@ - diff --git a/Samples/Azure/AzureThumbnailCreator/ServiceDefinition.csdef b/Samples/Azure/AzureThumbnailCreator/ServiceDefinition.csdef index 97d7874d43f..5a55cbbaa14 100644 --- a/Samples/Azure/AzureThumbnailCreator/ServiceDefinition.csdef +++ b/Samples/Azure/AzureThumbnailCreator/ServiceDefinition.csdef @@ -11,7 +11,6 @@ - diff --git a/lib/NHibernate.Drivers.Azure.TableStorage.dll b/lib/NHibernate.Drivers.Azure.TableStorage.dll index 2539dcd3f123552d9ed3c594d12c153113c23e5f..6974bd20ca14f748dea1639c74be6144d9470223 100644 GIT binary patch delta 7815 zcma)>3tUun+Q*;&IWtEXnCqDfw;4c~8^a7BsF1V^iQ#(546{Yu!dKaHS9cbWlqDTV zUs{qbdTcda6E}Oy*4OHt%1dPMmX@}e?3!tL!AoA!woF&e4EOmz2bF5y&%5y9d!Fa_ zJpbo^oik^crZ%yuO?>kA;wzi$7B6zLU5nS{2>(2+BDR+g0R47$(6T`9NeM(-KfIKm2m6l ztuLNyzyM?`4b~^feObv7G1&{y+1k;4Zi78>8+eOytd*sik6N~OJvoroqob_tGNjOrwD-XV;G;9H2U)GJ+Ek~GT!Obs3W zUWi2(CT-Hh{R0zatywFEzl)ZqK85{952kNtELK^Y;bB7b{fs$+UWXL`?7BlSf^UE_ z&a;H+l%t+Cn6%Kl#u3NsgJhp~3Of*dm>IyX|^Eqz#FLo#N$@q4qyhc?r#7(T>zvkIadQ^sFy2`We<+ogR%v} zA1OPthnu(~hH?FMkadSp_p#y(Cdc4$F@vV=uu>9CjO@dhqnFuxnXEVKgGPw4hxem4 zyBvVUfixi8gVP5|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ages/repositories.config +++ b/packages/repositories.config @@ -10,8 +10,6 @@ - - @@ -30,4 +28,6 @@ + + \ No newline at end of file diff --git a/src/azure/Hosting/NServiceBus.Hosting.Azure.HostProcess/WindowsHost.cs b/src/azure/Hosting/NServiceBus.Hosting.Azure.HostProcess/WindowsHost.cs index f3b8fa1a30b..b068b1f851d 100644 --- a/src/azure/Hosting/NServiceBus.Hosting.Azure.HostProcess/WindowsHost.cs +++ b/src/azure/Hosting/NServiceBus.Hosting.Azure.HostProcess/WindowsHost.cs @@ -25,7 +25,7 @@ public WindowsHost(Type endpointType, string[] args) args = AddProfilesFromConfiguration(args); - genericHost = new GenericHost(specifier, args, new[] { typeof(Development), typeof(OnAzureStorage) }); + genericHost = new GenericHost(specifier, args, new[] { typeof(Development), typeof(OnAzureTableStorage) }); } /// diff --git a/src/azure/Hosting/NServiceBus.Hosting.Azure/DynamicHost/DynamicEndpointLoader.cs b/src/azure/Hosting/NServiceBus.Hosting.Azure/DynamicHost/DynamicEndpointLoader.cs index 0b4e8f2ce2e..5becb077c27 100644 --- a/src/azure/Hosting/NServiceBus.Hosting.Azure/DynamicHost/DynamicEndpointLoader.cs +++ b/src/azure/Hosting/NServiceBus.Hosting.Azure/DynamicHost/DynamicEndpointLoader.cs @@ -40,6 +40,8 @@ public IEnumerable LoadEndpoints() } var blobContainer = client.GetContainerReference(container); + blobContainer.CreateIfNotExist(); + return from b in blobContainer.ListBlobs() where b.Uri.AbsolutePath.EndsWith(".zip") select new EndpointToHost((CloudBlockBlob)b) ; diff --git a/src/azure/Hosting/NServiceBus.Hosting.Azure/NServiceBus.Hosting.Azure.csproj b/src/azure/Hosting/NServiceBus.Hosting.Azure/NServiceBus.Hosting.Azure.csproj index 1811a7b418c..1cbf0de6ca0 100644 --- a/src/azure/Hosting/NServiceBus.Hosting.Azure/NServiceBus.Hosting.Azure.csproj +++ b/src/azure/Hosting/NServiceBus.Hosting.Azure/NServiceBus.Hosting.Azure.csproj @@ -47,6 +47,10 @@ False ..\..\..\..\lib\log4net.dll + + False + ..\..\..\..\build\azure\NServiceBus.Azure\Microsoft.ServiceBus.dll + False ..\..\..\..\lib\Azure\Microsoft.WindowsAzure.Diagnostics.dll @@ -104,8 +108,12 @@ - + + + + + diff --git a/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/Handler/OnAzureStorageProfileHandler.cs b/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/Handler/OnAzureStorageProfileHandler.cs index 7f2ac8acf0f..4d1a7706111 100644 --- a/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/Handler/OnAzureStorageProfileHandler.cs +++ b/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/Handler/OnAzureStorageProfileHandler.cs @@ -2,7 +2,7 @@ namespace NServiceBus.Hosting.Azure.Profiles.Handlers { - internal class OnAzureStorageProfileHandler : IHandleProfile + internal class OnAzureTableStorageProfileHandler : IHandleProfile { void IHandleProfile.ProfileActivated() { diff --git a/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/Handler/WithAppFabricQueuesProfileHandler.cs b/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/Handler/WithAppFabricQueuesProfileHandler.cs new file mode 100644 index 00000000000..f36d17b0e4f --- /dev/null +++ b/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/Handler/WithAppFabricQueuesProfileHandler.cs @@ -0,0 +1,14 @@ +using NServiceBus.Hosting.Profiles; + +namespace NServiceBus.Hosting.Azure.Profiles.Handlers +{ + internal class WithAppFabricQueuesProfileHandler : IHandleProfile + { + void IHandleProfile.ProfileActivated() + { + Configure.Instance + .AppFabricQueue(); + + } + } +} \ No newline at end of file diff --git a/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/Handler/WithStorageQueuesProfileHandler.cs b/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/Handler/WithStorageQueuesProfileHandler.cs new file mode 100644 index 00000000000..3ede58fafc4 --- /dev/null +++ b/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/Handler/WithStorageQueuesProfileHandler.cs @@ -0,0 +1,14 @@ +using NServiceBus.Hosting.Profiles; + +namespace NServiceBus.Hosting.Azure.Profiles.Handlers +{ + internal class WithAzureStorageQueuesProfileHandler : IHandleProfile + { + void IHandleProfile.ProfileActivated() + { + Configure.Instance + .AzureMessageQueue(); + + } + } +} \ No newline at end of file diff --git a/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/OnAzureStorage.cs b/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/OnAzureTableStorage.cs similarity index 63% rename from src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/OnAzureStorage.cs rename to src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/OnAzureTableStorage.cs index 0e2668a412e..18ea98048ba 100644 --- a/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/OnAzureStorage.cs +++ b/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/OnAzureTableStorage.cs @@ -1,9 +1,9 @@ namespace NServiceBus { /// - /// Indicates that the infrastructure should configure to run on top of azure storage + /// Indicates that the infrastructure should configure to run on top of azure table storage /// - public class OnAzureStorage : IProfile + public class OnAzureTableStorage : IProfile { } } \ No newline at end of file diff --git a/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/WithAppFabricQueues.cs b/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/WithAppFabricQueues.cs new file mode 100644 index 00000000000..8547a003009 --- /dev/null +++ b/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/WithAppFabricQueues.cs @@ -0,0 +1,6 @@ +namespace NServiceBus +{ + public class WithAppFabricQueues : IProfile + { + } +} \ No newline at end of file diff --git a/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/WithAzureStorageQueues.cs b/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/WithAzureStorageQueues.cs new file mode 100644 index 00000000000..6cc0b4742db --- /dev/null +++ b/src/azure/Hosting/NServiceBus.Hosting.Azure/Profiles/WithAzureStorageQueues.cs @@ -0,0 +1,6 @@ +namespace NServiceBus +{ + public class WithAzureStorageQueues : IProfile + { + } +} \ No newline at end of file diff --git a/src/azure/Hosting/NServiceBus.Hosting.Azure/RoleHost/Entrypoint.cs b/src/azure/Hosting/NServiceBus.Hosting.Azure/RoleHost/Entrypoint.cs index 80570ec2dbd..809846c231b 100644 --- a/src/azure/Hosting/NServiceBus.Hosting.Azure/RoleHost/Entrypoint.cs +++ b/src/azure/Hosting/NServiceBus.Hosting.Azure/RoleHost/Entrypoint.cs @@ -51,7 +51,7 @@ public override bool OnStart() } else { - host = new GenericHost(specifier, requestedProfiles, new[] { typeof(Development), typeof(OnAzureStorage) }); + host = new GenericHost(specifier, requestedProfiles, new[] { typeof(Development), typeof(OnAzureTableStorage) }); } return true; diff --git a/src/azure/Hosting/NServiceBus.Hosting.Azure/Roles/Handlers/ClientRoleHandler.cs b/src/azure/Hosting/NServiceBus.Hosting.Azure/Roles/Handlers/ClientRoleHandler.cs index 35b41ee08c2..9046495dae0 100644 --- a/src/azure/Hosting/NServiceBus.Hosting.Azure/Roles/Handlers/ClientRoleHandler.cs +++ b/src/azure/Hosting/NServiceBus.Hosting.Azure/Roles/Handlers/ClientRoleHandler.cs @@ -25,7 +25,6 @@ public ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier) } return instance - .AzureMessageQueue() .JsonSerializer() .IsTransactional(true) .UnicastBus() diff --git a/src/azure/Hosting/NServiceBus.Hosting.Azure/Roles/Handlers/WorkerRoleHandler.cs b/src/azure/Hosting/NServiceBus.Hosting.Azure/Roles/Handlers/WorkerRoleHandler.cs index ccb458793a8..3ece5a8e025 100644 --- a/src/azure/Hosting/NServiceBus.Hosting.Azure/Roles/Handlers/WorkerRoleHandler.cs +++ b/src/azure/Hosting/NServiceBus.Hosting.Azure/Roles/Handlers/WorkerRoleHandler.cs @@ -26,12 +26,10 @@ public ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier) } return instance - .AzureMessageQueue() .JsonSerializer() .IsTransactional(true) .UnicastBus() - .ImpersonateSender(false) - .LoadMessageHandlers(); + .ImpersonateSender(false); } diff --git a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/ConfigureAppFabricQueue.cs b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/ConfigureAppFabricQueue.cs index de741dfd2d9..fc6350500f6 100644 --- a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/ConfigureAppFabricQueue.cs +++ b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/ConfigureAppFabricQueue.cs @@ -1,6 +1,5 @@ using System.Configuration; using Microsoft.ServiceBus; -using Microsoft.ServiceBus.Description; using Microsoft.ServiceBus.Messaging; using NServiceBus.Config; using NServiceBus.ObjectBuilder; @@ -10,20 +9,19 @@ namespace NServiceBus { public static class ConfigureAppFabricQueue { - public static Configure AppFabricMessageQueue(this Configure config) + public static Configure AppFabricQueue(this Configure config) { var configSection = Configure.GetConfigSection(); if (configSection == null) throw new ConfigurationErrorsException("No AppFabricQueueConfig configuration section found"); - - var credentials = TransportClientCredentialBase.CreateSharedSecretCredential(configSection.IssuerName, configSection.IssuerKey); - var managementUri = ServiceBusEnvironment.CreateServiceUri("https", configSection.ServiceNamespace, string.Empty); - var runtimeUri = ServiceBusEnvironment.CreateServiceUri("sb", configSection.ServiceNamespace, string.Empty); - var namespaceClient = new ServiceBusNamespaceClient(managementUri, credentials); - var factory = MessagingFactory.Create(runtimeUri, credentials); + + var credentials = TokenProvider.CreateSharedSecretTokenProvider(configSection.IssuerName, configSection.IssuerKey); + var serviceUri = ServiceBusEnvironment.CreateServiceUri("sb", configSection.ServiceNamespace, string.Empty); + var namespaceClient = new NamespaceManager(serviceUri, credentials); + var factory = MessagingFactory.Create(serviceUri, credentials); - config.Configurer.RegisterSingleton(namespaceClient); + config.Configurer.RegisterSingleton(namespaceClient); config.Configurer.RegisterSingleton(factory); config.Configurer.ConfigureComponent(DependencyLifecycle.SingleInstance); diff --git a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/NServiceBus.Unicast.Queuing.AppFabric.Config.csproj b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/NServiceBus.Unicast.Queuing.AppFabric.Config.csproj index 571889e0ee2..e221fe21b42 100644 --- a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/NServiceBus.Unicast.Queuing.AppFabric.Config.csproj +++ b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/NServiceBus.Unicast.Queuing.AppFabric.Config.csproj @@ -31,12 +31,9 @@ 4 - - False - ..\..\..\..\packages\WindowsAzure.ServiceBus.0.6.0.0\lib\net40\Microsoft.ServiceBus.dll - - - ..\..\..\..\packages\WindowsAzure.ServiceBus.0.6.0.0\lib\net40\Microsoft.ServiceBus.Messaging.dll + + True + ..\..\..\..\packages\WindowsAzure.ServiceBus.1.5.0.0\lib\net40-full\Microsoft.ServiceBus.dll ..\..\..\..\build\output\NServiceBus.dll diff --git a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/app.config b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/app.config index e2aa2399f7b..296f244cdf6 100644 --- a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/app.config +++ b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/app.config @@ -4,25 +4,25 @@ - - - + + + - - - - - + + + + + - - - - - - - + + + + + + + diff --git a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/packages.config b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/packages.config index 0ec9bcb3ac7..f308d534c26 100644 --- a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/packages.config +++ b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric.Config/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/AppFabricQueue.cs b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/AppFabricQueue.cs index 568a043cbf8..6c4643ccf61 100644 --- a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/AppFabricQueue.cs +++ b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/AppFabricQueue.cs @@ -3,7 +3,6 @@ using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; -using System.ServiceModel; using System.Transactions; using Microsoft.ServiceBus; using Microsoft.ServiceBus.Messaging; @@ -13,17 +12,16 @@ namespace NServiceBus.Unicast.Queuing.AppFabric { public class AppFabricQueue : IReceiveMessages, ISendMessages { - private readonly Dictionary senders = new Dictionary(); + private readonly Dictionary senders = new Dictionary(); private static readonly object SenderLock = new Object(); private readonly MessagingFactory factory; - private readonly ServiceBusNamespaceClient namespaceClient; - private MessageReceiver receiver; + private readonly NamespaceManager namespaceClient; private bool useTransactions; private QueueClient queueClient; private string queueName; - public AppFabricQueue(MessagingFactory factory, ServiceBusNamespaceClient namespaceClient) + public AppFabricQueue(MessagingFactory factory, NamespaceManager namespaceClient) { this.factory = factory; this.namespaceClient = namespaceClient; @@ -40,18 +38,16 @@ public void Init(Address address, bool transactional) try { queueName = address.Queue; - var description = new QueueDescription {RequiresSession = false, RequiresDuplicateDetection = false, MaxQueueSizeInBytes = 104857600}; - namespaceClient.CreateQueue(queueName, description); + var description = new QueueDescription(queueName) { RequiresSession = false, RequiresDuplicateDetection = false, MaxSizeInMegabytes = 1024 }; + namespaceClient.CreateQueue(description); } catch (MessagingEntityAlreadyExistsException) { // the queue already exists, which is ok } - queueClient = factory.CreateQueueClient(queueName); - receiver = queueClient.CreateReceiver(ReceiveMode.PeekLock); - receiver.Faulted += (o, args) => receiver = queueClient.CreateReceiver(ReceiveMode.PeekLock); - + queueClient = factory.CreateQueueClient(queueName, ReceiveMode.PeekLock); + useTransactions = transactional; } @@ -64,8 +60,8 @@ public bool HasMessage() public TransportMessage Receive() { - BrokeredMessage message; - if(receiver.TryReceive(out message)) + BrokeredMessage message = queueClient.Receive(); + if(message != null) { var rawMessage = message.GetBody(); var t = DeserializeMessage(rawMessage); @@ -98,17 +94,16 @@ public void Send(TransportMessage message, Address address) { var destination = address.Queue; - MessageSender sender; - if(!senders.TryGetValue(destination, out sender) || sender.State == CommunicationState.Faulted) + QueueClient sender; + if (!senders.TryGetValue(destination, out sender) ) { lock (SenderLock) { - if (!senders.TryGetValue(destination, out sender) || sender.State == CommunicationState.Faulted) + if (!senders.TryGetValue(destination, out sender) ) { try { - var c = factory.CreateQueueClient(destination); - sender = c.CreateSender(); + sender = factory.CreateQueueClient(destination); senders[destination] = sender; } catch (MessagingEntityNotFoundException) @@ -122,7 +117,7 @@ public void Send(TransportMessage message, Address address) message.Id = Guid.NewGuid().ToString(); var rawMessage = SerializeMessage(message); - var brokeredMessage = BrokeredMessage.CreateMessage(rawMessage); + var brokeredMessage = new BrokeredMessage(rawMessage); if (Transaction.Current == null) sender.Send(brokeredMessage); @@ -139,8 +134,6 @@ private static byte[] SerializeMessage(TransportMessage originalMessage) formatter.Serialize(stream, originalMessage); return stream.ToArray(); } - - } private static TransportMessage DeserializeMessage(byte[] rawMessage) diff --git a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/NServiceBus.Unicast.Queuing.AppFabric.csproj b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/NServiceBus.Unicast.Queuing.AppFabric.csproj index 1bb584ad9c3..78931120b92 100644 --- a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/NServiceBus.Unicast.Queuing.AppFabric.csproj +++ b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/NServiceBus.Unicast.Queuing.AppFabric.csproj @@ -31,12 +31,9 @@ 4 - - False - ..\..\..\..\packages\WindowsAzure.ServiceBus.0.6.0.0\lib\net40\Microsoft.ServiceBus.dll - - - ..\..\..\..\packages\WindowsAzure.ServiceBus.0.6.0.0\lib\net40\Microsoft.ServiceBus.Messaging.dll + + True + ..\..\..\..\packages\WindowsAzure.ServiceBus.1.5.0.0\lib\net40-full\Microsoft.ServiceBus.dll ..\..\..\..\build\output\NServiceBus.dll diff --git a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/SendResourceManager.cs b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/SendResourceManager.cs index bc3a59b2875..473bdda2474 100644 --- a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/SendResourceManager.cs +++ b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/SendResourceManager.cs @@ -6,10 +6,10 @@ namespace NServiceBus.Unicast.Queuing.AppFabric { public class SendResourceManager : IEnlistmentNotification { - private readonly MessageSender sender; + private readonly QueueClient sender; private readonly BrokeredMessage message; - public SendResourceManager(MessageSender sender, BrokeredMessage message) + public SendResourceManager(QueueClient sender, BrokeredMessage message) { this.sender = sender; this.message = message; @@ -22,15 +22,7 @@ public void Prepare(PreparingEnlistment preparingEnlistment) public void Commit(Enlistment enlistment) { - try - { - sender.Send(message); - } - catch (Exception) - { - - throw; - } + sender.Send(message); enlistment.Done(); } diff --git a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/app.config b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/app.config new file mode 100644 index 00000000000..296f244cdf6 --- /dev/null +++ b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/app.config @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/packages.config b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/packages.config index 0ec9bcb3ac7..f308d534c26 100644 --- a/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/packages.config +++ b/src/azure/Queueing/NServiceBus.Unicast.Queuing.AppFabric/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/src/azure/Queueing/queuing.sln b/src/azure/Queueing/queuing.sln index 1bde207994d..4720fbd4320 100644 --- a/src/azure/Queueing/queuing.sln +++ b/src/azure/Queueing/queuing.sln @@ -11,6 +11,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Azure.Tests", "NServiceBus.Unicast.Queuing.Azure.Tests\NServiceBus.Unicast.Queuing.Azure.Tests.csproj", "{D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.AppFabric", "NServiceBus.Unicast.Queuing.AppFabric\NServiceBus.Unicast.Queuing.AppFabric.csproj", "{911C5871-B059-4F8D-99B3-86F13CDEFC86}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.AppFabric.Config", "NServiceBus.Unicast.Queuing.AppFabric.Config\NServiceBus.Unicast.Queuing.AppFabric.Config.csproj", "{350CA11F-E647-47F6-B9A3-1E1653B8D4B0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -29,6 +33,14 @@ Global {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}.Debug|Any CPU.Build.0 = Debug|Any CPU {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}.Release|Any CPU.ActiveCfg = Release|Any CPU {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}.Release|Any CPU.Build.0 = Release|Any CPU + {911C5871-B059-4F8D-99B3-86F13CDEFC86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {911C5871-B059-4F8D-99B3-86F13CDEFC86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {911C5871-B059-4F8D-99B3-86F13CDEFC86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {911C5871-B059-4F8D-99B3-86F13CDEFC86}.Release|Any CPU.Build.0 = Release|Any CPU + {350CA11F-E647-47F6-B9A3-1E1653B8D4B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {350CA11F-E647-47F6-B9A3-1E1653B8D4B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {350CA11F-E647-47F6-B9A3-1E1653B8D4B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {350CA11F-E647-47F6-B9A3-1E1653B8D4B0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -37,5 +49,7 @@ Global {D12E0534-9C6F-4E39-AC68-4212FF13E7F1} = {A46EEB01-F4EE-4842-9B23-2EA81EA82114} {87C365D3-7D4A-4686-A042-5E7B83869CBF} = {A46EEB01-F4EE-4842-9B23-2EA81EA82114} {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD} = {A46EEB01-F4EE-4842-9B23-2EA81EA82114} + {911C5871-B059-4F8D-99B3-86F13CDEFC86} = {AADC7038-53DD-416B-8DEC-3FDA4D15DAED} + {350CA11F-E647-47F6-B9A3-1E1653B8D4B0} = {AADC7038-53DD-416B-8DEC-3FDA4D15DAED} EndGlobalSection EndGlobal diff --git a/src/azure/SagaPersister/NServiceBus.SagaPersisters.Azure.Config/Internal/SessionFactoryBuilder.cs b/src/azure/SagaPersister/NServiceBus.SagaPersisters.Azure.Config/Internal/SessionFactoryBuilder.cs index 7b82bba6259..3f4b29a03ba 100644 --- a/src/azure/SagaPersister/NServiceBus.SagaPersisters.Azure.Config/Internal/SessionFactoryBuilder.cs +++ b/src/azure/SagaPersister/NServiceBus.SagaPersisters.Azure.Config/Internal/SessionFactoryBuilder.cs @@ -1,41 +1,41 @@ -using System; -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Reflection; using NHibernate; -using NHibernate.Context; +using NHibernate.Context; using NHibernate.Drivers.Azure.TableStorage.Mapping; using NHibernate.Mapping.ByCode; using NHibernate.Tool.hbm2ddl; -using NServiceBus.SagaPersisters.NHibernate.AutoPersistence; -using Configuration=NHibernate.Cfg.Configuration; - -namespace NServiceBus.SagaPersisters.Azure.Config.Internal -{ - /// - /// Builder class for the NHibernate Session Factory - /// - public class SessionFactoryBuilder - { - private readonly IEnumerable typesToScan; - - /// - /// Constructor that accepts the types to scan for saga data classes - /// - /// - public SessionFactoryBuilder(IEnumerable typesToScan) - { - this.typesToScan = typesToScan; - } - - /// - /// Builds the session factory with the given properties. Database is updated if updateSchema is set - /// - /// - /// - /// - public ISessionFactory Build(IDictionary nhibernateProperties, bool updateSchema) +using NServiceBus.SagaPersisters.NHibernate.AutoPersistence; +using Configuration=NHibernate.Cfg.Configuration; + +namespace NServiceBus.SagaPersisters.Azure.Config.Internal +{ + /// + /// Builder class for the NHibernate Session Factory + /// + public class SessionFactoryBuilder + { + private readonly IEnumerable typesToScan; + + /// + /// Constructor that accepts the types to scan for saga data classes + /// + /// + public SessionFactoryBuilder(IEnumerable typesToScan) + { + this.typesToScan = typesToScan; + } + + /// + /// Builds the session factory with the given properties. Database is updated if updateSchema is set + /// + /// + /// + /// + public ISessionFactory Build(IDictionary nhibernateProperties, bool updateSchema) { var scannedAssemblies = typesToScan.Select(t => t.Assembly).Distinct(); @@ -110,5 +110,5 @@ private static void ApplyDefaultsTo(Configuration configuration) configuration.SetProperty("current_session_context_class", typeof(ThreadStaticSessionContext).AssemblyQualifiedName); } - } + } } \ No newline at end of file diff --git a/src/core/NServiceBus/Address.cs b/src/core/NServiceBus/Address.cs index 114702c8e65..4e1c24cc226 100644 --- a/src/core/NServiceBus/Address.cs +++ b/src/core/NServiceBus/Address.cs @@ -38,8 +38,8 @@ public static void InitializeLocalAddress(string queue) /// public static void OverrideDefaultMachine(string machineName) { - if (Local != null) - throw new InvalidOperationException("The local address has already been initialized, changing the default machine name is no longer possible."); + //if (Local != null) + // throw new InvalidOperationException("The local address has already been initialized, changing the default machine name is no longer possible."); defaultMachine = machineName; } @@ -51,8 +51,8 @@ public static void OverrideDefaultMachine(string machineName) /// public static void InitializeAddressMode(AddressMode mode) { - if (Local != null) - throw new InvalidOperationException("The local address has already been initialized, switching address modes is no longer possible."); + //if (Local != null) + // throw new InvalidOperationException("The local address has already been initialized, switching address modes is no longer possible."); addressMode = mode; }