diff --git a/examples/Spring/Spring.MsmqQuickStart/Spring.MsmqQuickStart.2008.sln b/examples/Spring/Spring.MsmqQuickStart/Spring.MsmqQuickStart.2008.sln
new file mode 100644
index 00000000..e21d228e
--- /dev/null
+++ b/examples/Spring/Spring.MsmqQuickStart/Spring.MsmqQuickStart.2008.sln
@@ -0,0 +1,32 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.MsmqQuickStart.Common.2008", "src\Spring\Spring.MsmqQuickStart.Common\Spring.MsmqQuickStart.Common.2008.csproj", "{AC5A3035-75DD-48E5-ABCA-38FBC8193F22}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.MsmqQuickStart.Server.2008", "src\Spring\Spring.MsmqQuickStart.Server\Spring.MsmqQuickStart.Server.2008.csproj", "{85E7B947-8153-45E4-B572-BEDB191F1FB2}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.MsmqQuickStart.Client.2008", "src\Spring\Spring.MsmqQuickStart.Client\Spring.MsmqQuickStart.Client.2008.csproj", "{87D0B725-A652-4A6B-A95F-197F7155769F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AC5A3035-75DD-48E5-ABCA-38FBC8193F22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AC5A3035-75DD-48E5-ABCA-38FBC8193F22}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AC5A3035-75DD-48E5-ABCA-38FBC8193F22}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AC5A3035-75DD-48E5-ABCA-38FBC8193F22}.Release|Any CPU.Build.0 = Release|Any CPU
+ {85E7B947-8153-45E4-B572-BEDB191F1FB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {85E7B947-8153-45E4-B572-BEDB191F1FB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {85E7B947-8153-45E4-B572-BEDB191F1FB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {85E7B947-8153-45E4-B572-BEDB191F1FB2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {87D0B725-A652-4A6B-A95F-197F7155769F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {87D0B725-A652-4A6B-A95F-197F7155769F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {87D0B725-A652-4A6B-A95F-197F7155769F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {87D0B725-A652-4A6B-A95F-197F7155769F}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Client/Spring.MsmqQuickStart.Client.2008.csproj b/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Client/Spring.MsmqQuickStart.Client.2008.csproj
new file mode 100644
index 00000000..f9f4d0d4
--- /dev/null
+++ b/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Client/Spring.MsmqQuickStart.Client.2008.csproj
@@ -0,0 +1,171 @@
+
+
+ Debug
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {87D0B725-A652-4A6B-A95F-197F7155769F}
+ WinExe
+ Properties
+ Spring.MsmqQuickStart.Client
+ Spring.MsmqQuickStart.Client
+
+
+ 2.0
+
+
+ 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
+ false
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\..\..\..\lib\Net\2.0\antlr.runtime.dll
+
+
+ False
+ ..\..\..\..\..\..\lib\Net\2.0\Common.Logging.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Spring.Aop.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Spring.Core.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Spring.Data.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Spring.Messaging.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ StockForm.cs
+ Designer
+
+
+ True
+ Resources.resx
+ True
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+ Form
+
+
+ StockForm.cs
+
+
+
+
+ {AC5A3035-75DD-48E5-ABCA-38FBC8193F22}
+ Spring.MsmqQuickStart.Common.2008
+
+
+
+
+ Always
+
+
+ Always
+
+
+
+
+ False
+ .NET Framework Client Profile
+ false
+
+
+ False
+ .NET Framework 2.0 %28x86%29
+ true
+
+
+ False
+ .NET Framework 3.0 %28x86%29
+ false
+
+
+ False
+ .NET Framework 3.5
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Common/Spring.MsmqQuickStart.Common.2008.csproj b/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Common/Spring.MsmqQuickStart.Common.2008.csproj
new file mode 100644
index 00000000..a3048adb
--- /dev/null
+++ b/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Common/Spring.MsmqQuickStart.Common.2008.csproj
@@ -0,0 +1,138 @@
+
+
+ Debug
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {AC5A3035-75DD-48E5-ABCA-38FBC8193F22}
+ Library
+ Properties
+ Spring.MsmqQuickStart.Common
+ Spring.MsmqQuickStart.Common
+
+
+ 2.0
+
+
+ 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
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\antlr.runtime.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Common.Logging.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Spring.Aop.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Spring.Core.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Spring.Data.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Spring.Messaging.dll
+
+
+
+
+
+
+
+
+ TradeResponse.xsd
+
+
+ TradeRequest.xsd
+
+
+
+
+
+ Designer
+
+
+ TradeResponse.xsd
+
+
+ Designer
+
+
+ TradeRequest.xsd
+
+
+
+
+ False
+ .NET Framework Client Profile
+ false
+
+
+ False
+ .NET Framework 2.0 %28x86%29
+ true
+
+
+ False
+ .NET Framework 3.0 %28x86%29
+ false
+
+
+ False
+ .NET Framework 3.5
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Server/Handlers/StockAppHandler.cs b/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Server/Handlers/StockAppHandler.cs
index 3144c1e5..383b0ec6 100644
--- a/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Server/Handlers/StockAppHandler.cs
+++ b/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Server/Handlers/StockAppHandler.cs
@@ -1,6 +1,8 @@
using System.Collections;
+using System.Threading;
+using Common.Logging;
using Spring.MsmqQuickStart.Common.Data;
using Spring.MsmqQuickStart.Server.Services;
using Spring.Util;
@@ -9,11 +11,11 @@ namespace Spring.MsmqQuickStart.Server.Handlers
{
public class StockAppHandler
{
- private IExecutionVenueService executionVenueService;
+ private readonly ILog log = LogManager.GetLogger(typeof(StockAppHandler));
- private ICreditCheckService creditCheckService;
-
- private ITradingService tradingService;
+ private readonly IExecutionVenueService executionVenueService;
+ private readonly ICreditCheckService creditCheckService;
+ private readonly ITradingService tradingService;
public StockAppHandler(IExecutionVenueService executionVenueService, ICreditCheckService creditCheckService, ITradingService tradingService)
{
@@ -24,6 +26,7 @@ namespace Spring.MsmqQuickStart.Server.Handlers
public TradeResponse Handle(TradeRequest tradeRequest)
{
+ log.Info("received trade request - sleeping 2s to simulate long-running task");
TradeResponse tradeResponse;
ArrayList errors = new ArrayList();
if (creditCheckService.CanExecute(tradeRequest, errors))
@@ -38,6 +41,8 @@ namespace Spring.MsmqQuickStart.Server.Handlers
}
tradingService.ProcessTrade(tradeRequest, tradeResponse);
+
+ Thread.Sleep(2000);
return tradeResponse;
}
}
diff --git a/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Server/Program.cs b/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Server/Program.cs
index d1621d80..ede2567e 100644
--- a/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Server/Program.cs
+++ b/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Server/Program.cs
@@ -1,5 +1,6 @@
using System;
using System.Threading;
+using Spring.Context;
using Spring.Context.Support;
using Spring.MsmqQuickStart.Server.Gateways;
@@ -12,15 +13,17 @@ namespace Spring.MsmqQuickStart.Server
try
{
// Using Spring's IoC container
- ContextRegistry.GetContext(); // Force Spring to load configuration
- Console.Out.WriteLine("Server listening...");
- IMarketDataService marketDataService =
- ContextRegistry.GetContext().GetObject("marketDataGateway") as MarketDataServiceGateway;
- ThreadStart job = new ThreadStart(marketDataService.SendMarketData);
- Thread thread = new Thread(job);
- thread.Start();
- Console.Out.WriteLine("--- Press to quit ---");
- Console.ReadLine();
+ using (IApplicationContext appContext = ContextRegistry.GetContext())
+ {
+ Console.Out.WriteLine("Server listening...");
+ IMarketDataService marketDataService = appContext.GetObject("marketDataGateway") as MarketDataServiceGateway;
+ ThreadStart job = new ThreadStart(marketDataService.SendMarketData);
+ Thread thread = new Thread(job);
+ thread.IsBackground = true;
+ thread.Start();
+ Console.Out.WriteLine("--- Press to quit ---");
+ Console.ReadLine();
+ }
}
catch (Exception e)
{
diff --git a/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Server/Spring.MsmqQuickStart.Server.2008.csproj b/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Server/Spring.MsmqQuickStart.Server.2008.csproj
new file mode 100644
index 00000000..86b0d1fe
--- /dev/null
+++ b/examples/Spring/Spring.MsmqQuickStart/src/Spring/Spring.MsmqQuickStart.Server/Spring.MsmqQuickStart.Server.2008.csproj
@@ -0,0 +1,148 @@
+
+
+ Debug
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {85E7B947-8153-45E4-B572-BEDB191F1FB2}
+ Exe
+ Properties
+ Spring.MsmqQuickStart.Server
+ Spring.MsmqQuickStart.Server
+
+
+ 2.0
+
+
+ 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
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\antlr.runtime.dll
+
+
+ False
+ ..\..\..\..\..\..\lib\Net\2.0\Common.Logging.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Spring.Aop.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Spring.Core.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Spring.Data.dll
+
+
+ False
+ ..\..\..\..\..\..\bin\net\2.0\debug\Spring.Messaging.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {AC5A3035-75DD-48E5-ABCA-38FBC8193F22}
+ Spring.MsmqQuickStart.Common.2008
+
+
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+
+
+ False
+ .NET Framework Client Profile
+ false
+
+
+ False
+ .NET Framework 2.0 %28x86%29
+ true
+
+
+ False
+ .NET Framework 3.0 %28x86%29
+ false
+
+
+ False
+ .NET Framework 3.5
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/Spring/Spring.WcfQuickStart/src/Spring.WcfQuickStart.ClientApp/Config/ServerApp.xml b/examples/Spring/Spring.WcfQuickStart/src/Spring.WcfQuickStart.ClientApp/Config/ServerApp.xml
index 67d620d4..97ddbed5 100644
--- a/examples/Spring/Spring.WcfQuickStart/src/Spring.WcfQuickStart.ClientApp/Config/ServerApp.xml
+++ b/examples/Spring/Spring.WcfQuickStart/src/Spring.WcfQuickStart.ClientApp/Config/ServerApp.xml
@@ -6,6 +6,7 @@
type="Spring.WcfQuickStart.ICalculator, Spring.WcfQuickStart.ClientApp"
factory-object="serverAppCalculatorChannelFactory"
factory-method="CreateChannel" />
+