diff --git a/doc/reference/src/nh-quickstart.xml b/doc/reference/src/nh-quickstart.xml
index 761d8a0a..d0335c11 100644
--- a/doc/reference/src/nh-quickstart.xml
+++ b/doc/reference/src/nh-quickstart.xml
@@ -28,23 +28,31 @@
Introduction
- This QuickStart application uses the all too familiar Northwind
- database and uses NHibernate browse and edit customers. It It is a very
- simple application that directly uses the DAO layer in some cases and also
- has a simple service layer that simulated a fullillment process. See the
- integration tests as well for insight into how it works. The application
- uses Spring's declarative transaction management features,
- HibernateTemplate helper class, and Open Session In View module.
- The example will be updated to not use HibernateTemplate and instead use the standard NHibernate API in a future release. All functionality is still present when using the standard NHibernate API, as Spring transaction managment is integrated into NHibernate extension points and exception translation is provided by AOP advice. See the section titled Implementing DAOs based on plain Hibernate 1.2/2.0 API" in the hibernate orm section of the reference docs for more information.
- To run the application make the Web application the project that
- starts and set Default.aspx as the start page. You will see a list of
- customers. If you select 'edit' then you can edit some customer info and
- save it by pressing the save button. Note that you will need to explicitly
- navigate back to the Default.aspx page and reload it in order to see the
- changes.
- To follow this NHibernate QuickStart load the solution file
- found in the directory
- <spring-install-dir>\examples\Spring\Spring.Data.NHibernate.Northwind
-
+
+ This QuickStart application uses the all too familiar Northwind
+ database and uses NHibernate browse and edit customers. It It is a very
+ simple application that directly uses the DAO layer in some cases and also
+ has a simple service layer that simulated a fullillment process. See the
+ integration tests as well for insight into how it works. The application
+ uses Spring's declarative transaction management features,
+ standard NHibernate API, and Open Session In View module.
+
+ Even though data access is performed through NHibernate API all Spring.NET provided functionality is
+ still present when using the standard NHibernate API, as Spring transaction managment
+ is integrated into NHibernate extension points and exception translation is
+ provided by AOP advice.
+ See the section titled Implementing DAOs based on plain Hibernate 1.2/2.0 API"
+ in the hibernate orm section of the reference docs for more information.
+
+ To run the application make the Web application the project that
+ starts and set Default.aspx as the start page.
+
+
+ To follow this NHibernate QuickStart load the solution file
+ found in the directory
+ <spring-install-dir>\examples\Spring\Spring.Data.NHibernate.Northwind
+
+
+
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/Spring.Northwind.2008.sln b/examples/Spring/Spring.Data.NHibernate.Northwind/Spring.Northwind.2008.sln
new file mode 100644
index 00000000..915e18bb
--- /dev/null
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/Spring.Northwind.2008.sln
@@ -0,0 +1,125 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Spring.Northwind.Web", "src\Spring.Northwind.Web\", "{3E321CBC-75B0-45C4-AFEF-7CEED28368AE}"
+ ProjectSection(WebsiteProperties) = preProject
+ TargetFramework = "3.5"
+ ProjectReferences = "{53B04C54-63EA-45AA-BB83-8950AF3C5D68}|Spring.Aspects.dll;{7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}|Spring.Northwind.Dao.dll;{6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}|Spring.Northwind.Dao.NHibernate.dll;{9E15876F-E9E0-43B7-9874-B54F163757D6}|Spring.Northwind.Service.dll;{FD89FEBE-4914-45F3-9123-B2CB954810DD}|Spring.Northwind.Web.References.dll;"
+ Debug.AspNetCompiler.VirtualPath = "/Spring.Northwind.Web"
+ Debug.AspNetCompiler.PhysicalPath = "src\Spring.Northwind.Web\"
+ Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Spring.Northwind.Web\"
+ Debug.AspNetCompiler.Updateable = "true"
+ Debug.AspNetCompiler.ForceOverwrite = "true"
+ Debug.AspNetCompiler.FixedNames = "false"
+ Debug.AspNetCompiler.Debug = "True"
+ Release.AspNetCompiler.VirtualPath = "/Spring.Northwind.Web"
+ Release.AspNetCompiler.PhysicalPath = "src\Spring.Northwind.Web\"
+ Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Spring.Northwind.Web\"
+ Release.AspNetCompiler.Updateable = "true"
+ Release.AspNetCompiler.ForceOverwrite = "true"
+ Release.AspNetCompiler.FixedNames = "false"
+ Release.AspNetCompiler.Debug = "False"
+ VWDPort = "17866"
+ DefaultWebSiteLanguage = "Visual C#"
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Northwind.Service.2008", "src\Spring.Northwind.Service\Spring.Northwind.Service.2008.csproj", "{9E15876F-E9E0-43B7-9874-B54F163757D6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Northwind.Dao.2008", "src\Spring.Northwind.Dao\Spring.Northwind.Dao.2008.csproj", "{7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Northwind.Dao.NHibernate.2008", "src\Spring.Northwind.Dao.NHibernate\Spring.Northwind.Dao.NHibernate.2008.csproj", "{6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Northwind.IntegrationTests.2008", "test\Spring.Northwind.IntegrationTests\Spring.Northwind.IntegrationTests.2008.csproj", "{2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Aspects.2008", "src\Spring.Aspects\Spring.Aspects.2008.csproj", "{53B04C54-63EA-45AA-BB83-8950AF3C5D68}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Northwind.Web.References.2008", "src\Spring.Northwind.Web.References\Spring.Northwind.Web.References.2008.csproj", "{FD89FEBE-4914-45F3-9123-B2CB954810DD}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|.NET = Debug|.NET
+ Debug|Any CPU = Debug|Any CPU
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Release|.NET = Release|.NET
+ Release|Any CPU = Release|Any CPU
+ Release|Mixed Platforms = Release|Mixed Platforms
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3E321CBC-75B0-45C4-AFEF-7CEED28368AE}.Debug|.NET.ActiveCfg = Debug|.NET
+ {3E321CBC-75B0-45C4-AFEF-7CEED28368AE}.Debug|.NET.Build.0 = Debug|.NET
+ {3E321CBC-75B0-45C4-AFEF-7CEED28368AE}.Debug|Any CPU.ActiveCfg = Debug|.NET
+ {3E321CBC-75B0-45C4-AFEF-7CEED28368AE}.Debug|Mixed Platforms.ActiveCfg = Debug|.NET
+ {3E321CBC-75B0-45C4-AFEF-7CEED28368AE}.Debug|Mixed Platforms.Build.0 = Debug|.NET
+ {3E321CBC-75B0-45C4-AFEF-7CEED28368AE}.Release|.NET.ActiveCfg = Debug|.NET
+ {3E321CBC-75B0-45C4-AFEF-7CEED28368AE}.Release|.NET.Build.0 = Debug|.NET
+ {3E321CBC-75B0-45C4-AFEF-7CEED28368AE}.Release|Any CPU.ActiveCfg = Debug|.NET
+ {3E321CBC-75B0-45C4-AFEF-7CEED28368AE}.Release|Mixed Platforms.ActiveCfg = Debug|.NET
+ {3E321CBC-75B0-45C4-AFEF-7CEED28368AE}.Release|Mixed Platforms.Build.0 = Debug|.NET
+ {9E15876F-E9E0-43B7-9874-B54F163757D6}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {9E15876F-E9E0-43B7-9874-B54F163757D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9E15876F-E9E0-43B7-9874-B54F163757D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9E15876F-E9E0-43B7-9874-B54F163757D6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {9E15876F-E9E0-43B7-9874-B54F163757D6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {9E15876F-E9E0-43B7-9874-B54F163757D6}.Release|.NET.ActiveCfg = Release|Any CPU
+ {9E15876F-E9E0-43B7-9874-B54F163757D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9E15876F-E9E0-43B7-9874-B54F163757D6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9E15876F-E9E0-43B7-9874-B54F163757D6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {9E15876F-E9E0-43B7-9874-B54F163757D6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}.Release|.NET.ActiveCfg = Release|Any CPU
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}.Release|.NET.ActiveCfg = Release|Any CPU
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|.NET.ActiveCfg = Release|Any CPU
+ {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|.NET.ActiveCfg = Release|Any CPU
+ {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Any CPU.Build.0 = Release|Any CPU
+ {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Release|.NET.ActiveCfg = Release|Any CPU
+ {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ NAntAddinLastFileName =
+ EndGlobalSection
+EndGlobal
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Spring.Aspects.2008.csproj b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Spring.Aspects.2008.csproj
new file mode 100644
index 00000000..d8ab2c5a
--- /dev/null
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Spring.Aspects.2008.csproj
@@ -0,0 +1,60 @@
+
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {53B04C54-63EA-45AA-BB83-8950AF3C5D68}
+ Library
+ Properties
+ Spring
+ Spring.Aspects
+
+
+ 2.0
+
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\..\..\lib\Net\2.0\Common.Logging.dll
+
+
+ False
+ ..\..\..\..\..\bin\net\2.0\debug\Spring.Aop.dll
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Dao.NHibernate/Spring.Northwind.Dao.NHibernate.2008.csproj b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Dao.NHibernate/Spring.Northwind.Dao.NHibernate.2008.csproj
new file mode 100644
index 00000000..81af1bd8
--- /dev/null
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Dao.NHibernate/Spring.Northwind.Dao.NHibernate.2008.csproj
@@ -0,0 +1,110 @@
+
+
+ Debug
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}
+ Library
+ Properties
+ Spring.Northwind
+ Spring.Northwind.Dao.NHibernate
+
+
+ 2.0
+
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\..\..\lib\net\2.0\antlr.runtime.dll
+
+
+ False
+ ..\..\..\..\..\bin\net\2.0\debug\Common.Logging.dll
+
+
+ False
+ ..\..\..\..\..\lib\NHibernate21\net\2.0\Iesi.Collections.dll
+
+
+ False
+ ..\..\..\..\..\lib\NHibernate21\net\2.0\log4net.dll
+
+
+ False
+ ..\..\..\..\..\lib\NHibernate21\net\2.0\NHibernate.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.Data.NHibernate21.dll
+
+
+
+
+
+
+
+
+ Code
+
+
+
+ Code
+
+
+ Code
+
+
+
+
+
+
+
+
+
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}
+ Spring.Northwind.Dao
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Dao/Spring.Northwind.Dao.2008.csproj b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Dao/Spring.Northwind.Dao.2008.csproj
new file mode 100644
index 00000000..f2f03357
--- /dev/null
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Dao/Spring.Northwind.Dao.2008.csproj
@@ -0,0 +1,59 @@
+
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}
+ Library
+ Properties
+ Spring.Northwind
+ Spring.Northwind.Dao
+
+
+ 2.0
+
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Service/Service/FulfillmentService.cs b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Service/Service/FulfillmentService.cs
index 68da4f9d..173f991d 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Service/Service/FulfillmentService.cs
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Service/Service/FulfillmentService.cs
@@ -23,6 +23,8 @@
using System;
using System.Collections;
+using Common.Logging;
+
using Spring.Transaction.Interceptor;
using Spring.Northwind.Dao;
@@ -35,7 +37,9 @@ namespace Spring.Northwind.Service
public class FulfillmentService : IFulfillmentService
{
#region Fields
-
+
+ private static readonly ILog log = LogManager.GetLogger(typeof (FulfillmentService));
+
private IProductDao productDao;
private ICustomerDao customerDao;
@@ -86,9 +90,16 @@ namespace Spring.Northwind.Service
foreach (Order order in customer.Orders)
{
+ if (order.ShippedDate.HasValue)
+ {
+ log.Warn("Order with " + order.Id + " has already been shipped, skipping.");
+ continue;
+ }
+
//Validate Order
Validate(order);
-
+ log.Info("Order " + order.Id + " validated, proceeding with shipping..");
+
//Ship with external shipping service
ShippingService.ShipOrder(order);
@@ -97,7 +108,7 @@ namespace Spring.Northwind.Service
//Update shipment date
OrderDao.Update(order);
-
+
//Other operations...Decrease product quantity... etc
}
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Service/Spring.Northwind.Service.2008.csproj b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Service/Spring.Northwind.Service.2008.csproj
new file mode 100644
index 00000000..fb56a8b8
--- /dev/null
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Service/Spring.Northwind.Service.2008.csproj
@@ -0,0 +1,75 @@
+
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {9E15876F-E9E0-43B7-9874-B54F163757D6}
+ Library
+ Properties
+ Spring.Northwind
+ Spring.Northwind.Service
+
+
+ 2.0
+
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\..\..\lib\Net\2.0\Common.Logging.dll
+
+
+ False
+ ..\..\..\..\..\bin\net\2.0\debug\Spring.Data.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}
+ Spring.Northwind.Dao.NHibernate
+
+
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}
+ Spring.Northwind.Dao
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web.References/Spring.Northwind.Web.References.2008.csproj b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web.References/Spring.Northwind.Web.References.2008.csproj
new file mode 100644
index 00000000..9bc63e3f
--- /dev/null
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web.References/Spring.Northwind.Web.References.2008.csproj
@@ -0,0 +1,96 @@
+
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {FD89FEBE-4914-45F3-9123-B2CB954810DD}
+ Library
+ Properties
+ Spring.Northwind.Web.References
+ Spring.Northwind.Web.References
+
+
+ 2.0
+
+
+
+
+ true
+ full
+ false
+ .
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ .
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\..\..\bin\net\2.0\debug\antlr.runtime.dll
+
+
+ False
+ ..\..\..\..\..\lib\NHibernate21\net\2.0\Antlr3.Runtime.dll
+
+
+ False
+ ..\..\..\..\..\bin\net\2.0\debug\Common.Logging.dll
+
+
+ False
+ ..\..\lib\net\2.0\Common.Logging.Log4Net.dll
+
+
+ False
+ ..\..\..\..\..\lib\NHibernate21\net\2.0\Iesi.Collections.dll
+
+
+ False
+ ..\..\..\..\..\lib\NHibernate21\net\2.0\LinFu.DynamicProxy.dll
+
+
+ False
+ ..\..\lib\net\2.0\log4net.dll
+
+
+ False
+ ..\..\..\..\..\lib\NHibernate21\net\2.0\NHibernate.dll
+
+
+ False
+ ..\..\..\..\..\lib\NHibernate21\net\2.0\NHibernate.ByteCode.LinFu.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.Web.dll
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data/NORTHWND.MDF b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data/NORTHWND.MDF
index 0ef778c7..d8cfaad4 100644
Binary files a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data/NORTHWND.MDF and b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data/NORTHWND.MDF differ
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data/NORTHWND_log.ldf b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data/NORTHWND_log.ldf
index fa529836..1dff3527 100644
Binary files a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data/NORTHWND_log.ldf and b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data/NORTHWND_log.ldf differ
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CSS/style.css b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CSS/style.css
index 784e77f6..6500a1b3 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CSS/style.css
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CSS/style.css
@@ -61,6 +61,16 @@ fieldset legend {
padding: 5px;
}
+.actionResultWindow
+{
+ margin: 30px;
+ border: 1px solid #CCA383;
+ width: 90%;
+ background: LightGoldenrodYellow;
+ text-align: left;
+ padding: 5px;
+}
+
#headerCell
{
background: url(../img/header-spring.png);
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Config/Log4Net.xml b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Config/Log4Net.xml
index b56c21df..cecc333e 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Config/Log4Net.xml
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Config/Log4Net.xml
@@ -25,6 +25,10 @@
+
+
+
+
@@ -42,4 +46,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerEditor.aspx b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerEditor.aspx
index 7061a2a4..9ba5ab64 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerEditor.aspx
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerEditor.aspx
@@ -30,8 +30,8 @@
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerEditor.aspx.cs b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerEditor.aspx.cs
index ce673e79..ece38b25 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerEditor.aspx.cs
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerEditor.aspx.cs
@@ -58,6 +58,14 @@ public partial class CustomerEditor : Page
private void BtnSave_Click(object sender, EventArgs e)
{
customerDao.Update(CurrentCustomer);
- Response.Redirect("~/CustomerView.aspx");
+ SetResult("ViewCustomer");
+ }
+ protected void customerList_Click(object sender, EventArgs e)
+ {
+ SetResult("CustomerList");
+ }
+ protected void cancel_Click(object sender, EventArgs e)
+ {
+ SetResult("CancelEdit");
}
}
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerList.aspx b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerList.aspx
index 9863da94..39a02a23 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerList.aspx
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerList.aspx
@@ -5,6 +5,14 @@
Customers in database
+
+ Below you can see all customers in the database paged to grid.
+ By clicking customer name you enter the details and edit information.
+ By clicking orders you can see all orders that customer has. Orders can
+ be in shipped state (they have shipped date) or they can be waiting for
+ shipment. You can ship orders that aren't shipped yet on the orders screen.
+
+
-
- <%# Eval("ContactName")%>
-
+
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerList.aspx.cs b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerList.aspx.cs
index af51a621..655d97c9 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerList.aspx.cs
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerList.aspx.cs
@@ -78,7 +78,7 @@ public partial class CustomerList : Spring.Web.UI.Page
switch(e.CommandName)
{
case "ViewOrders":
- case "EditCustomer":
+ case "ViewCustomer":
customerList.SelectedIndex = e.Item.ItemIndex;
customerEditController.EditCustomer(this.SelectedCustomer);
SetResult(e.CommandName);
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerOrders.aspx b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerOrders.aspx
index ee722394..af45c8d4 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerOrders.aspx
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerOrders.aspx
@@ -5,6 +5,13 @@
Orders for customer
+
+ On this screen you can see all orders that customer has. By clicking "Process Orders" you
+ can send service request to ship all unshipped orders for that customer. Behind the scenes
+ Spring.NET will begin service level transaction that propagates to DAO layer which then
+ automatically participates int the existing transaction.
+
+
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerOrders.aspx.cs b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerOrders.aspx.cs
index dfa2f028..82372a05 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerOrders.aspx.cs
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerOrders.aspx.cs
@@ -63,4 +63,12 @@ public partial class CustomerOrders : Spring.Web.UI.Page
e.Item.DataItem = ((IList) customerOrders.DataSource)[e.Item.DataSetIndex];
}
}
+ protected void customerList_Click(object sender, EventArgs e)
+ {
+ SetResult("CustomerList");
+ }
+ protected void processOrders_Click(object sender, EventArgs e)
+ {
+ SetResult("ProcessOrders");
+ }
}
\ No newline at end of file
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerView.aspx b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerView.aspx
index 7d02181c..91db5860 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerView.aspx
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerView.aspx
@@ -25,8 +25,8 @@
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerView.aspx.cs b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerView.aspx.cs
index d150b512..6f8739fe 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerView.aspx.cs
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/CustomerView.aspx.cs
@@ -58,4 +58,12 @@ public partial class CustomerView : Page
}
+ protected void customerList_Click(object sender, EventArgs e)
+ {
+ SetResult("CustomerList");
+ }
+ protected void editCustomer_Click(object sender, EventArgs e)
+ {
+ SetResult("EditCustomer");
+ }
}
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Default.aspx b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Default.aspx
index 99e348a7..1e0725ef 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Default.aspx
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Default.aspx
@@ -9,5 +9,5 @@ This sample demostrates Spring.NET NHibernate integration and concepts. All data
all transactions are automatically handled by Spring.NET.
-Proceed to customer listing »
+Proceed to customer listing »
\ No newline at end of file
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Default.aspx.cs b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Default.aspx.cs
index 1ee22fc0..0d94db8f 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Default.aspx.cs
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Default.aspx.cs
@@ -46,4 +46,8 @@ public partial class _Default : Spring.Web.UI.Page
}
}
}
+ protected void customerList_Click(object sender, EventArgs e)
+ {
+ SetResult("CustomerList");
+ }
}
\ No newline at end of file
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/FulfillmentResult.aspx b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/FulfillmentResult.aspx
new file mode 100644
index 00000000..676f0d3d
--- /dev/null
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/FulfillmentResult.aspx
@@ -0,0 +1,21 @@
+<%@ Page Language="C#" MasterPageFile="~/Shared/MasterPage.master" AutoEventWireup="true"
+ CodeFile="FulfillmentResult.aspx.cs" Inherits="FullfillmentResult" %>
+
+<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
+ Namespace="System.Web.UI" TagPrefix="asp" %>
+
+ Order processing results
+
+
+ Below you can see the results from order fullfilment.
+
+
+
+
+
+
« Back to customer order list
+
+
+
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/FulfillmentResult.aspx.cs b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/FulfillmentResult.aspx.cs
new file mode 100644
index 00000000..540930c9
--- /dev/null
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/FulfillmentResult.aspx.cs
@@ -0,0 +1,68 @@
+using System;
+using System.IO;
+
+using Common.Logging;
+
+using log4net.Appender;
+using log4net.Core;
+using log4net.Layout;
+using log4net.Repository;
+
+using Spring.Northwind.Service;
+using Spring.Web.UI;
+
+using ILog=log4net.ILog;
+using LogManager=log4net.LogManager;
+
+public partial class FullfillmentResult : Page
+{
+ private IFulfillmentService fulfillmentService;
+ private ICustomerEditController customerEditController;
+
+ public IFulfillmentService FulfillmentService
+ {
+ set { fulfillmentService = value; }
+ }
+
+ public ICustomerEditController CustomerEditController
+ {
+ set { customerEditController = value; }
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ // gather log4net output with small hack to get results...
+ ILoggerRepository repository = LogManager.GetRepository();
+ IAppender[] appenders = repository.GetAppenders();
+ MemoryAppender appender = null;
+ foreach (IAppender a in appenders)
+ {
+ if (a is MemoryAppender)
+ {
+ // we found our appender to look results from
+ appender = a as MemoryAppender;
+ break;
+ }
+ }
+
+ if (appender != null)
+ {
+ appender.Clear();
+ fulfillmentService.ProcessCustomer(customerEditController.CurrentCustomer.Id);
+ LoggingEvent[] events = appender.GetEvents();
+ StringWriter stringWriter = new StringWriter();
+ PatternLayout layout = new PatternLayout("%date{HH:mm:ss} %-5level %logger{1}: %message ");
+ foreach (LoggingEvent loggingEvent in events)
+ {
+ layout.Format(stringWriter, loggingEvent);
+ }
+
+ results.Text = stringWriter.ToString();
+ }
+
+ }
+ protected void customerOrders_Click(object sender, EventArgs e)
+ {
+ SetResult("Back");
+ }
+}
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Web.config b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Web.config
index d4cdec1e..38bab582 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Web.config
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Web.config
@@ -67,7 +67,15 @@
-
+
+
+
+
+
+
+
+
+
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Web.xml b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Web.xml
index 56782857..2842ab25 100644
--- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Web.xml
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Web.xml
@@ -1,44 +1,79 @@
-
+
-
- The Northwind web layer definitions
-
+
+ The Northwind web layer definitions
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/test/Spring.Northwind.IntegrationTests/Spring.Northwind.IntegrationTests.2008.csproj b/examples/Spring/Spring.Data.NHibernate.Northwind/test/Spring.Northwind.IntegrationTests/Spring.Northwind.IntegrationTests.2008.csproj
new file mode 100644
index 00000000..9b381d49
--- /dev/null
+++ b/examples/Spring/Spring.Data.NHibernate.Northwind/test/Spring.Northwind.IntegrationTests/Spring.Northwind.IntegrationTests.2008.csproj
@@ -0,0 +1,123 @@
+
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}
+ Library
+ Properties
+ Spring.Northwind
+ Spring.Northwind.IntegrationTests
+
+
+ 2.0
+
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\..\..\lib\Net\2.0\antlr.runtime.dll
+
+
+ False
+ ..\..\..\..\..\lib\Net\2.0\Common.Logging.dll
+
+
+ False
+ ..\..\..\..\..\lib\NHibernate21\net\2.0\Iesi.Collections.dll
+
+
+ False
+ ..\..\..\..\..\lib\NHibernate21\net\2.0\log4net.dll
+
+
+ False
+ ..\..\..\..\..\lib\NHibernate21\net\2.0\NHibernate.dll
+
+
+ False
+ ..\..\..\..\..\lib\net\2.0\nunit.framework.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.Data.NHibernate21.dll
+
+
+ False
+ ..\..\..\..\..\bin\net\2.0\debug\Spring.Testing.NUnit.dll
+
+
+ False
+ ..\..\..\..\..\bin\net\2.0\debug\Spring.Web.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {53B04C54-63EA-45AA-BB83-8950AF3C5D68}
+ Spring.Aspects
+
+
+ {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}
+ Spring.Northwind.Dao.NHibernate
+
+
+ {7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}
+ Spring.Northwind.Dao
+
+
+ {9E15876F-E9E0-43B7-9874-B54F163757D6}
+ Spring.Northwind.Service
+
+
+
+
+
+ rem echo "Copying .xml files for tests"
+rem xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2005\Spring.Northwind.IntegrationTests\$(ConfigurationName)\ /y /s /q
+
+
\ No newline at end of file