From 44e4c3bf68459220cf250a29bd1bcac0c37db2bc Mon Sep 17 00:00:00 2001 From: Sean Gilliam Date: Fri, 6 Feb 2015 23:39:21 -0600 Subject: [PATCH 01/16] Fixed method signature --- src/Spring/Spring.Core/Core/IO/EncodedResource.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Spring/Spring.Core/Core/IO/EncodedResource.cs b/src/Spring/Spring.Core/Core/IO/EncodedResource.cs index c1b4a591..ed7e2175 100644 --- a/src/Spring/Spring.Core/Core/IO/EncodedResource.cs +++ b/src/Spring/Spring.Core/Core/IO/EncodedResource.cs @@ -50,7 +50,7 @@ namespace Spring.Core.IO /// Create an encoded resource, autodetecting the encoding from the resource stream. /// /// the resource to read from. Must not be null - /// whether to autoDetect encoding from byte-order marks () + /// whether to autoDetect encoding from byte-order marks () public EncodedResource(IResource resource, bool autoDetectEncoding) :this(resource, null, autoDetectEncoding) { @@ -62,7 +62,7 @@ namespace Spring.Core.IO /// /// the resource to read from. Must not be null /// the encoding to use. If null, encoding will be autodetected. - /// whether to autoDetect encoding from byte-order marks () + /// whether to autoDetect encoding from byte-order marks () public EncodedResource(IResource resource, Encoding encoding, bool autoDetectEncoding) { AssertUtils.ArgumentNotNull(resource, "resource"); @@ -88,7 +88,7 @@ namespace Spring.Core.IO } /// - /// whether to autoDetect encoding from byte-order marks () + /// whether to autoDetect encoding from byte-order marks () /// public bool AutoDetectEncoding { From 50c4683db1a90d903c3299709c8c9aa8bdfd50c5 Mon Sep 17 00:00:00 2001 From: Yerko Nauls Date: Fri, 20 Feb 2015 11:46:56 -0500 Subject: [PATCH 02/16] pushing project "Spring.SessionFactoryImplError.Tests" to help troubleshoot https://github.com/spring-projects/spring-net/issues/96#issuecomment-73162888 --- Spring.Net.2010.sln | 64 +++-------- .../App.config | 64 +++++++++++ .../Container.cs | 10 ++ .../CreateTable.sql | 10 ++ .../IContainer.cs | 10 ++ .../IService1.cs | 9 ++ .../IService2.cs | 9 ++ .../Mappings.hbm.xml | 12 ++ .../Properties/AssemblyInfo.cs | 36 ++++++ .../Service1.cs | 27 +++++ .../Service2.cs | 27 +++++ .../Spring.Configuration.xml | 41 +++++++ .../Spring.NHibernate.xml | 41 +++++++ ...pring.SessionFactoryImplError.Tests.csproj | 107 ++++++++++++++++++ .../TestFixture.cs | 44 +++++++ 15 files changed, 460 insertions(+), 51 deletions(-) create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/App.config create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/Container.cs create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/CreateTable.sql create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/IContainer.cs create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/IService1.cs create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/IService2.cs create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/Mappings.hbm.xml create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/Properties/AssemblyInfo.cs create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/Service1.cs create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/Service2.cs create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/Spring.Configuration.xml create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/Spring.NHibernate.xml create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/Spring.SessionFactoryImplError.Tests.csproj create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/TestFixture.cs diff --git a/Spring.Net.2010.sln b/Spring.Net.2010.sln index 21173b1e..1140a8e8 100644 --- a/Spring.Net.2010.sln +++ b/Spring.Net.2010.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.30723.0 +VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F04753EF-7A1B-4837-AB63-8C0821E8155D}" ProjectSection(SolutionItems) = preProject @@ -105,6 +105,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate4.Tes EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate4.Integration.Tests.2010", "test\Spring\Spring.Data.NHibernate4.Integration.Tests\Spring.Data.NHibernate4.Integration.Tests.2010.csproj", "{46F8B5E9-ABCF-4306-BC05-FF05B0FAC151}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.SessionFactoryImplError.Tests", "test\Spring\Spring.SessionFactoryImplError.Tests\Spring.SessionFactoryImplError.Tests.csproj", "{DE276F7C-4564-49EC-AABC-B964EC3D1626}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|.NET = Debug|.NET @@ -383,26 +385,6 @@ Global {7321149A-47C6-4FBA-9D1A-26FD6815381B}.Release|Any CPU.Build.0 = Release|Any CPU {7321149A-47C6-4FBA-9D1A-26FD6815381B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {7321149A-47C6-4FBA-9D1A-26FD6815381B}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Debug|.NET.ActiveCfg = Debug|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Release|.NET.ActiveCfg = Release|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Release|Any CPU.Build.0 = Release|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Debug|.NET.ActiveCfg = Debug|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Release|.NET.ActiveCfg = Release|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Release|Any CPU.Build.0 = Release|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Release|Mixed Platforms.Build.0 = Release|Any CPU {D546EFB7-9F6C-4C11-B2F8-B85FAD135399}.Debug|.NET.ActiveCfg = Debug|Any CPU {D546EFB7-9F6C-4C11-B2F8-B85FAD135399}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D546EFB7-9F6C-4C11-B2F8-B85FAD135399}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -475,16 +457,6 @@ Global {FA934E92-C8C2-428A-BE2A-26818F17A787}.Release|.NET.ActiveCfg = Release|Any CPU {FA934E92-C8C2-428A-BE2A-26818F17A787}.Release|Any CPU.ActiveCfg = Release|Any CPU {FA934E92-C8C2-428A-BE2A-26818F17A787}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Debug|.NET.ActiveCfg = Debug|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Release|.NET.ActiveCfg = Release|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Release|Any CPU.Build.0 = Release|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Release|Mixed Platforms.Build.0 = Release|Any CPU {6B7DA759-F46D-4860-AF03-E7AC7498E003}.Debug|.NET.ActiveCfg = Debug|Any CPU {6B7DA759-F46D-4860-AF03-E7AC7498E003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6B7DA759-F46D-4860-AF03-E7AC7498E003}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -515,16 +487,6 @@ Global {8CF0F34A-CC93-4D87-AE14-A2DEEF072F26}.Release|Any CPU.Build.0 = Release|Any CPU {8CF0F34A-CC93-4D87-AE14-A2DEEF072F26}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {8CF0F34A-CC93-4D87-AE14-A2DEEF072F26}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Debug|.NET.ActiveCfg = Debug|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Debug|Any CPU.Build.0 = Debug|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Release|.NET.ActiveCfg = Release|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Release|Any CPU.ActiveCfg = Release|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Release|Any CPU.Build.0 = Release|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Release|Mixed Platforms.Build.0 = Release|Any CPU {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}.Debug|.NET.ActiveCfg = Debug|Any CPU {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -535,16 +497,6 @@ Global {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}.Release|Any CPU.Build.0 = Release|Any CPU {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Debug|.NET.ActiveCfg = Debug|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Release|.NET.ActiveCfg = Release|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Release|Any CPU.Build.0 = Release|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Release|Mixed Platforms.Build.0 = Release|Any CPU {C57B05EA-FD1A-40EC-BB60-D2E45AB1A86A}.Debug|.NET.ActiveCfg = Debug|Any CPU {C57B05EA-FD1A-40EC-BB60-D2E45AB1A86A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C57B05EA-FD1A-40EC-BB60-D2E45AB1A86A}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -605,6 +557,16 @@ Global {46F8B5E9-ABCF-4306-BC05-FF05B0FAC151}.Release|Any CPU.Build.0 = Release|Any CPU {46F8B5E9-ABCF-4306-BC05-FF05B0FAC151}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {46F8B5E9-ABCF-4306-BC05-FF05B0FAC151}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {DE276F7C-4564-49EC-AABC-B964EC3D1626}.Debug|.NET.ActiveCfg = Debug|Any CPU + {DE276F7C-4564-49EC-AABC-B964EC3D1626}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE276F7C-4564-49EC-AABC-B964EC3D1626}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE276F7C-4564-49EC-AABC-B964EC3D1626}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {DE276F7C-4564-49EC-AABC-B964EC3D1626}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {DE276F7C-4564-49EC-AABC-B964EC3D1626}.Release|.NET.ActiveCfg = Release|Any CPU + {DE276F7C-4564-49EC-AABC-B964EC3D1626}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE276F7C-4564-49EC-AABC-B964EC3D1626}.Release|Any CPU.Build.0 = Release|Any CPU + {DE276F7C-4564-49EC-AABC-B964EC3D1626}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {DE276F7C-4564-49EC-AABC-B964EC3D1626}.Release|Mixed Platforms.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/App.config b/test/Spring/Spring.SessionFactoryImplError.Tests/App.config new file mode 100644 index 00000000..d0476f1b --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/App.config @@ -0,0 +1,64 @@ + + + + +
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Container.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/Container.cs new file mode 100644 index 00000000..c4f06edf --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Container.cs @@ -0,0 +1,10 @@ +using System; + +namespace Spring.SessionFactoryImplError.Tests +{ + public class Container : IContainer + { + public Guid Id { get; set; } + public string Name { get; set; } + } +} diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/CreateTable.sql b/test/Spring/Spring.SessionFactoryImplError.Tests/CreateTable.sql new file mode 100644 index 00000000..1c96dcf6 --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/CreateTable.sql @@ -0,0 +1,10 @@ +/* + Script used to create table SQL Server +*/ + +CREATE TABLE [dbo].[Container]( + [Id] [uniqueidentifier] NOT NULL, + [Name] [nvarchar](50) NOT NULL +) ON [PRIMARY] + + diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/IContainer.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/IContainer.cs new file mode 100644 index 00000000..c703a969 --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/IContainer.cs @@ -0,0 +1,10 @@ +using System; + +namespace Spring.SessionFactoryImplError.Tests +{ + public interface IContainer + { + Guid Id { get; set; } + string Name { get; set; } + } +} diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/IService1.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/IService1.cs new file mode 100644 index 00000000..866f13b8 --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/IService1.cs @@ -0,0 +1,9 @@ +namespace Spring.SessionFactoryImplError.Tests +{ + public interface IService1 + { + void ServiceMethod1(); + + void ServiceMethod2(); + } +} diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/IService2.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/IService2.cs new file mode 100644 index 00000000..9031a68f --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/IService2.cs @@ -0,0 +1,9 @@ +namespace Spring.SessionFactoryImplError.Tests +{ + public interface IService2 + { + void ServiceMethod1(); + + void ServiceMethod2(); + } +} diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Mappings.hbm.xml b/test/Spring/Spring.SessionFactoryImplError.Tests/Mappings.hbm.xml new file mode 100644 index 00000000..0dc5b421 --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Mappings.hbm.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Properties/AssemblyInfo.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..264dec25 --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/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("Spring.SessionFactoryImplError.Tests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Spring.SessionFactoryImplError.Tests")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[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("3f4ca2dc-e2e6-40cc-90d3-0fdda9912e50")] + +// 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/test/Spring/Spring.SessionFactoryImplError.Tests/Service1.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/Service1.cs new file mode 100644 index 00000000..54be54ce --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Service1.cs @@ -0,0 +1,27 @@ +using Spring.Data.NHibernate.Generic; +using Spring.Transaction; + +namespace Spring.SessionFactoryImplError.Tests +{ + [Transaction.Interceptor.Transaction(TransactionPropagation.Supports, ReadOnly = true)] + public class Service1 : IService1 + { + #region DI + + public HibernateTemplate HibernateTemplate { get; set; } + + #endregion + + [Transaction.Interceptor.Transaction(TransactionPropagation.NotSupported)] + public virtual void ServiceMethod1() + { + ServiceMethod2(); + } + + [Transaction.Interceptor.Transaction(TransactionPropagation.NotSupported)] + public virtual void ServiceMethod2() + { + // do some stuff + } + } +} diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Service2.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/Service2.cs new file mode 100644 index 00000000..5de7a2cc --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Service2.cs @@ -0,0 +1,27 @@ +using Spring.Data.NHibernate.Generic; +using Spring.Transaction; + +namespace Spring.SessionFactoryImplError.Tests +{ + [Transaction.Interceptor.Transaction(TransactionPropagation.Supports, ReadOnly = true)] + public class Service2 : IService2 + { + #region DI + + public HibernateTemplate HibernateTemplate { get; set; } + + #endregion + + [Transaction.Interceptor.Transaction(TransactionPropagation.NotSupported)] + public virtual void ServiceMethod1() + { + ServiceMethod2(); + } + + [Transaction.Interceptor.Transaction(TransactionPropagation.RequiresNew)] + public virtual void ServiceMethod2() + { + // do stuff + } + } +} diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.Configuration.xml b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.Configuration.xml new file mode 100644 index 00000000..feac28c9 --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.Configuration.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + *Service* + + + + + transactionAdvice + + + + + + + + + + + + diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.NHibernate.xml b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.NHibernate.xml new file mode 100644 index 00000000..bf72be9c --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.NHibernate.xml @@ -0,0 +1,41 @@ + + + Dependency Injection for NHibernate Session + + + + + + + + + + + + + + + + + + + + + + + + + + + assembly://Spring.SessionFactoryImplError.Tests/Spring.SessionFactoryImplError.Tests/Mappings.hbm.xml + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.SessionFactoryImplError.Tests.csproj b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.SessionFactoryImplError.Tests.csproj new file mode 100644 index 00000000..96a02f23 --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.SessionFactoryImplError.Tests.csproj @@ -0,0 +1,107 @@ + + + + + Debug + AnyCPU + {DE276F7C-4564-49EC-AABC-B964EC3D1626} + Library + Properties + Spring.SessionFactoryImplError.Tests + Spring.SessionFactoryImplError.Tests + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll + + + False + ..\..\..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll + + + ..\..\..\packages\NHibernate.4.0.3.4000\lib\net40\NHibernate.dll + + + False + ..\..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll + + + + + + + + + + + + + + + + + + + + + + {3a3a4e65-45a6-4b20-b460-0bedc302c02c} + Spring.Aop.2010 + + + {710961A3-0DF4-49E4-A26E-F5B9C044AC84} + Spring.Core.2010 + + + {d9c45177-0d80-4133-ab46-58f142db92aa} + Spring.Data.NHibernate4.2010 + + + {ae00e5ab-c39a-436f-86d2-33bfe33e2e40} + Spring.Data.2010 + + + {ed204a7b-832f-44c7-bfe3-504aebe1bcc8} + Spring.Testing.NUnit.2010 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/TestFixture.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/TestFixture.cs new file mode 100644 index 00000000..cb8eb375 --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/TestFixture.cs @@ -0,0 +1,44 @@ +using NUnit.Framework; + +using Spring.Data.NHibernate.Generic; +using Spring.Testing.NUnit; + +namespace Spring.SessionFactoryImplError.Tests +{ + [TestFixture] + public class TestFixture : AbstractTransactionalSpringContextTests + { + #region DI + + public HibernateTemplate HibernateTemplate { get; set; } + public IService1 Service1 { get; set; } + public IService2 Service2 { get; set; } + + #endregion + + protected override string[] ConfigLocations + { + get + { + return new[] + { + "config://spring/objects", + "assembly://Spring.SessionFactoryImplError.Tests/Spring.SessionFactoryImplError.Tests/Spring.Configuration.xml", + "assembly://Spring.SessionFactoryImplError.Tests/Spring.SessionFactoryImplError.Tests/Spring.NHibernate.xml" + }; + } + } + + [Test(Description = "This is failing test case in my unit test, Not Supported -> Not Supported")] + public void TestSuspendTransactionOnNotSupported() + { + Service1.ServiceMethod1(); + } + + [Test(Description = "This is also failing, Not Supported -> Requires New")] + public void TestSuspendTransactionOnRequiresNew() + { + Service2.ServiceMethod1(); + } + } +} From 0907b9a796ab60c01bd54875831b3afad82fa045 Mon Sep 17 00:00:00 2001 From: Yerko Nauls Date: Sun, 8 Mar 2015 15:46:17 -0400 Subject: [PATCH 03/16] Added custom TX Scope Manager and test fixture that shows original error. --- ...ng132HibernateTxScopeTransactionManager.cs | 1168 +++++++++++++++++ .../IService1.cs | 10 +- .../IService2.cs | 4 +- .../Service1.cs | 24 +- .../Service2.cs | 6 +- .../Spring.Configuration.xml | 5 - ...stomHibernateTxScopeTransactionManager.xml | 11 + ...ing.HibernateTxScopeTransactionManager.xml | 11 + ...pring.SessionFactoryImplError.Tests.csproj | 7 +- .../TestFixture.cs | 44 - ...ustomHibernateTxScopeTransactionManager.cs | 50 + ...UsingHibernateTxScopeTransactionManager.cs | 51 + 12 files changed, 1331 insertions(+), 60 deletions(-) create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/CustomSpring132HibernateTxScopeTransactionManager.cs create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/Spring.CustomHibernateTxScopeTransactionManager.xml create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/Spring.HibernateTxScopeTransactionManager.xml delete mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/TestFixture.cs create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/TestUsingCustomHibernateTxScopeTransactionManager.cs create mode 100644 test/Spring/Spring.SessionFactoryImplError.Tests/TestUsingHibernateTxScopeTransactionManager.cs diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/CustomSpring132HibernateTxScopeTransactionManager.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/CustomSpring132HibernateTxScopeTransactionManager.cs new file mode 100644 index 00000000..009f5299 --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/CustomSpring132HibernateTxScopeTransactionManager.cs @@ -0,0 +1,1168 @@ +using System; +using System.Data; +using System.Reflection; +using System.Transactions; +using NHibernate; +using NHibernate.Transaction; +using Spring.Core.TypeResolution; +using Spring.Dao; +using Spring.Data.Common; +using Spring.Data.Core; +using Spring.Data.NHibernate; +using Spring.Data.Support; +using Spring.Objects.Factory; +using Spring.Transaction; +using Spring.Transaction.Support; +using HibernateTransactionException = NHibernate.TransactionException; + +namespace Spring.SessionFactoryImplError.Tests +{ + /// + /// A complete copy and selective re-write of the Spring.Data.NHibernate. from the Spring.Data.NHibernate32 DLL + /// to patch bugs with their implementation that could not be rectified by overriding the class (due to so much private scoping). + /// + /// + /// This will be committed to source control in its first version the same way as it appeared in the Spring.NET v1.3.2 (.NET v4.0, VS 2010) source code; therefore, changes + /// from the base version in v1.3.2 will be discernable from source control. Those changes will need to be ported to the version of the + /// in the next upgrade of Spring.NET, and so forth. A new copy of that versions HibernateTxScopeTransactionManager will need to be copied into a CustomSpring132HibernateTxScopeTransactionManager + /// file, that should be committed, then the changes need to be ported. This should continue until Spring's version is bug-free. + /// + public class CustomSpring132HibernateTxScopeTransactionManager : AbstractPlatformTransactionManager, IResourceTransactionManager, IObjectFactoryAware, IInitializingObject + { + #region Fields + + private ISessionFactory sessionFactory; + + private IDbProvider dbProvider; + + private bool autodetectDbProvider = true; + + private Object entityInterceptor; + + private IAdoExceptionTranslator adoExceptionTranslator; + + private IAdoExceptionTranslator defaultExceptionTranslator; + + /// + /// Just needed for entityInterceptorBeanName. + /// + private IObjectFactory objectFactory; + + private TxScopeTransactionManager txScopeTranactionManager; + + private static readonly MethodInfo SessionFactoryUtils_CloseSessionOrRegisterDeferredClose_Method; + + #endregion + + #region Constructor (s) + + /// + /// Static constructor to get a handle to a internal method from a spring assembly that is needed in this assembly. + /// + static CustomSpring132HibernateTxScopeTransactionManager() + { + Type sfuType = typeof (SessionFactoryUtils); + SessionFactoryUtils_CloseSessionOrRegisterDeferredClose_Method = sfuType.GetMethod("CloseSessionOrRegisterDeferredClose", BindingFlags.Static | BindingFlags.NonPublic); + } + + /// + /// Initializes a new instance of the class. + /// + public CustomSpring132HibernateTxScopeTransactionManager() + { + txScopeTranactionManager = new TxScopeTransactionManager(); + } + + /// + /// Initializes a new instance of the class. + /// + /// The session factory. + public CustomSpring132HibernateTxScopeTransactionManager(ISessionFactory sessionFactory) + { + this.sessionFactory = sessionFactory; + AfterPropertiesSet(); + } + + #endregion + + #region Properties + + /// + /// Gets or sets the db provider. + /// + /// The db provider. + public IDbProvider DbProvider + { + get { return dbProvider; } + set { dbProvider = value; } + } + + /// + /// Gets or sets a Hibernate entity interceptor that allows to inspect and change + /// property values before writing to and reading from the database. + /// When getting, return the current Hibernate entity interceptor, or null if none. + /// + /// The entity interceptor. + /// + /// Resolves an entity interceptor object name via the object factory, + /// if necessary. + /// Will get applied to any new Session created by this transaction manager. + /// Such an interceptor can either be set at the SessionFactory level, + /// i.e. on LocalSessionFactoryObject, or at the Session level, i.e. on + /// HibernateTemplate, HibernateInterceptor, and HibernateTransactionManager. + /// It's preferable to set it on LocalSessionFactoryObject or HibernateTransactionManager + /// to avoid repeated configuration and guarantee consistent behavior in transactions. + /// + /// If object factory is null and need to get entity interceptor via object name. + public IInterceptor EntityInterceptor + { + get + { + if (this.entityInterceptor is IInterceptor) + { + return (IInterceptor)entityInterceptor; + } + else if (this.entityInterceptor is string) + { + if (this.objectFactory == null) + { + throw new InvalidOperationException("Cannot get entity interceptor via object name if no object factory set"); + } + String objectName = (String)this.entityInterceptor; + return (IInterceptor)this.objectFactory.GetObject(objectName, typeof(IInterceptor)); + } + else + { + return null; + } + } + set + { + entityInterceptor = value; + } + } + + /// + /// Sets the object name of a Hibernate entity interceptor that + /// allows to inspect and change property values before writing to and reading from the database. + /// + /// The name of the entity interceptor object. + /// + /// Will get applied to any new Session created by this transaction manager. + ///

Requires the object factory to be known, to be able to resolve the object + /// name to an interceptor instance on session creation. Typically used for + /// prototype interceptors, i.e. a new interceptor instance per session. + ///

+ ///

Can also be used for shared interceptor instances, but it is recommended + /// to set the interceptor reference directly in such a scenario. + ///

+ ///
+ public string EntityInterceptorObjectName + { + set + { + entityInterceptor = value; + } + } + + /// + /// Gets or sets the ADO.NET exception translator for this transaction manager. + /// + /// + /// Applied to ADO.NET Exceptions (wrapped by Hibernate's ADOException) + /// + /// The ADO exception translator. + public IAdoExceptionTranslator AdoExceptionTranslator + { + get { return adoExceptionTranslator; } + set { adoExceptionTranslator = value; } + } + + /// + /// Gets the default IAdoException translator, lazily creating it if nece + /// + /// The default IAdoException translator. + public IAdoExceptionTranslator DefaultAdoExceptionTranslator + { + get + { + lock (this) + { + if (defaultExceptionTranslator == null) + { + if (dbProvider != null) + { + defaultExceptionTranslator = new ErrorCodeExceptionTranslator(dbProvider); + } + else + { + defaultExceptionTranslator = SessionFactoryUtils.NewAdoExceptionTranslator(SessionFactory); + } + } + return defaultExceptionTranslator; + } + } + } + + /// + /// Gets or sets the SessionFactory that this instance should manage transactions for. + /// + /// The session factory. + public ISessionFactory SessionFactory + { + get { return sessionFactory; } + set { sessionFactory = value; } + } + + + /// + /// Gets the resource factory that this transaction manager operates on, + /// For the HibenratePlatformTransactionManager this the SessionFactory + /// + /// The SessionFactory. + public object ResourceFactory + { + get { return sessionFactory; } + } + + /// + /// Set whether to autodetect a ADO.NET connection used by the Hibernate SessionFactory, + /// if set via LocalSessionFactoryObject's DbProvider. Default is "true". + /// + /// + /// true if [autodetect data source]; otherwise, false. + /// + /// + ///

Can be turned off to deliberately ignore an available IDbProvider, + /// to not expose Hibernate transactions as ADO.NET transactions for that IDbProvider. + ///

+ ///
+ public bool AutodetectDbProvider + { + set { autodetectDbProvider = value; } + } + + #endregion + + #region Methods + + #endregion + + + /// + /// The object factory just needs to be known for resolving entity interceptor + /// It does not need to be set for any other mode of operation. + /// + /// + /// Owning + /// (may not be ). The object can immediately + /// call methods on the factory. + /// + public IObjectFactory ObjectFactory + { + set + { + objectFactory = value; + } + } + + /// + /// Return the current transaction object. + /// + /// The current transaction object. + /// + /// If transaction support is not available. + /// + /// + /// In the case of lookup or system errors. + /// + protected override object DoGetTransaction() + { + if (log.IsDebugEnabled) + { + if (System.Transactions.Transaction.Current == null) + { + log.Debug("DoGetTransaction: No transaction currently exists"); + } + else + { + log.Debug(string.Format("DoGetTransaction: Getting transaction object for existing System.Transactions.Transaction{0}", WriteTransactionInformation(System.Transactions.Transaction.Current))); + } + } + + HibernateTransactionObject txObject = new HibernateTransactionObject(); + txObject.SavepointAllowed = NestedTransactionsAllowed; + + if (TransactionSynchronizationManager.HasResource(SessionFactory)) + { + SessionHolder sessionHolder = + (SessionHolder)TransactionSynchronizationManager.GetResource(SessionFactory); + if (log.IsDebugEnabled) + { + log.Debug("Found thread-bound Session [" + sessionHolder.Session + + "] for Hibernate transaction"); + } + txObject.SetSessionHolder(sessionHolder, false); + if (DbProvider != null) + { + ConnectionHolder conHolder = (ConnectionHolder) + TransactionSynchronizationManager.GetResource(DbProvider); + txObject.ConnectionHolder = conHolder; + } + } + txObject.PromotableTxScopeTransactionObject = new TxScopeTransactionManager.PromotableTxScopeTransactionObject(); + + return txObject; + } + + /// + /// Check if the given transaction object indicates an existing, + /// i.e. already begun, transaction. + /// + /// + /// Transaction object returned by + /// . + /// + /// True if there is an existing transaction. + /// + /// In the case of system errors. + /// + protected override bool IsExistingTransaction(object transaction) + { + return + ((HibernateTransactionObject)transaction).PromotableTxScopeTransactionObject.TxScopeAdapter. + IsExistingTransaction && + ((HibernateTransactionObject) transaction).HasTransaction(); + } + + /// + /// Begin a new transaction with the given transaction definition. + /// + /// + /// Transaction object returned by + /// . + /// + /// + /// instance, describing + /// propagation behavior, isolation level, timeout etc. + /// + /// + /// Does not have to care about applying the propagation behavior, + /// as this has already been handled by this abstract manager. + /// + /// + /// In the case of creation or system errors. + /// + protected override void DoBegin(object transaction, ITransactionDefinition definition) + { + + TxScopeTransactionManager.PromotableTxScopeTransactionObject promotableTxScopeTransactionObject = + ((HibernateTransactionObject)transaction).PromotableTxScopeTransactionObject; + try + { + DoTxScopeBegin(promotableTxScopeTransactionObject, definition); + } + catch (Exception e) + { + throw new CannotCreateTransactionException("Transaction Scope failure on begin", e); + } + + if (log.IsDebugEnabled) + { + log.Debug(string.Format("DoBegin: Began new System.Transactions.Transaction{0}", WriteTransactionInformation(System.Transactions.Transaction.Current))); + } + + HibernateTransactionObject txObject = (HibernateTransactionObject)transaction; + + if (DbProvider != null && TransactionSynchronizationManager.HasResource(DbProvider) + && !txObject.ConnectionHolder.SynchronizedWithTransaction) + { + throw new IllegalTransactionStateException( + "Pre-bound ADO.NET Connection found - HibernateTransactionManager does not support " + + "running within AdoTransactionManager if told to manage the DbProvider itself. " + + "It is recommended to use a single HibernateTransactionManager for all transactions " + + "on a single DbProvider, no matter whether Hibernate or ADO.NET access."); + } + + ISession session = null; + try + { + + if (txObject.SessionHolder == null || txObject.SessionHolder.SynchronizedWithTransaction) + { + IInterceptor interceptor = EntityInterceptor; + ISession newSession = (interceptor != null ? + SessionFactory.OpenSession(interceptor) : SessionFactory.OpenSession()); + + if (log.IsDebugEnabled) + { + log.Debug("Opened new Session [" + newSession + "] for Hibernate transaction"); + } + txObject.SetSessionHolder(new SessionHolder(newSession), true); + + } + txObject.SessionHolder.SynchronizedWithTransaction = true; + session = txObject.SessionHolder.Session; + + IDbConnection con; + try + { + con = session.Connection; + //TODO isolation level mgmt + //IsolationLevel previousIsolationLevel = + } + catch (System.Data.SqlClient.SqlException ex) + { + // Retry logic as a workaround for ADO.NET 2.0 vulnerabilty: KB916002 and MS Connect bug 93731 + if (ex.Message.Contains("New request is not allowed to start because it should come with valid transaction descriptor")) + { + if (log.IsWarnEnabled) + { + log.Warn("Forced to clear all SQL connection pools due to corrupted transaction context on a connection from the connection pool (KB916002)."); + } + System.Data.SqlClient.SqlConnection.ClearAllPools(); + con = session.Connection; + } + else + { + throw; + } + } + + if (definition.ReadOnly && txObject.NewSessionHolder) + { + // Just set to NEVER in case of a new Session for this transaction. + session.FlushMode = FlushMode.Never; + } + + if (!definition.ReadOnly && !txObject.NewSessionHolder) + { + // We need AUTO or COMMIT for a non-read-only transaction. + FlushMode flushMode = session.FlushMode; + if (FlushMode.Never == flushMode) + { + session.FlushMode = FlushMode.Auto; + txObject.SessionHolder.PreviousFlushMode = flushMode; + } + } + + // Add the Hibernate transaction to the session holder. + // for now pass in tx options isolation level. + ITransaction hibernateTx = session.BeginTransaction(definition.TransactionIsolationLevel); + IDbTransaction adoTx = GetIDbTransaction(hibernateTx); + + // Add the Hibernate transaction to the session holder. + txObject.SessionHolder.Transaction = hibernateTx; + + // Register transaction timeout. + int timeout = DetermineTimeout(definition); + if (timeout != DefaultTransactionDefinition.TIMEOUT_DEFAULT) + { + txObject.SessionHolder.TimeoutInSeconds = timeout; + } + + // Register the Hibernate Session's ADO.NET Connection/TX pair for the DbProvider, if set. + if (DbProvider != null) + { + //investigate passing null for tx. + ConnectionHolder conHolder = new ConnectionHolder(con, adoTx); + if (timeout != DefaultTransactionDefinition.TIMEOUT_DEFAULT) + { + conHolder.TimeoutInMillis = definition.TransactionTimeout; + } + if (log.IsDebugEnabled) + { + log.Debug("Exposing Hibernate transaction as ADO transaction [" + con + "]"); + } + TransactionSynchronizationManager.BindResource(DbProvider, conHolder); + txObject.ConnectionHolder = conHolder; + } + + // Bind the session holder to the thread. + if (txObject.NewSessionHolder) + { + TransactionSynchronizationManager.BindResource(SessionFactory, txObject.SessionHolder); + } + + } + catch (Exception ex) + { + SessionFactoryUtils.CloseSession(session); + throw new CannotCreateTransactionException("Could not open Hibernate Session for transaction", ex); + } + + + } + + private void DoTxScopeBegin(TxScopeTransactionManager.PromotableTxScopeTransactionObject txObject, + Spring.Transaction.ITransactionDefinition definition) + { + + TransactionScopeOption txScopeOption = CreateTransactionScopeOptions(definition); + TransactionOptions txOptions = CreateTransactionOptions(definition); + txObject.TxScopeAdapter.CreateTransactionScope(txScopeOption, txOptions, definition.EnterpriseServicesInteropOption); + + } + + private static TransactionScopeOption CreateTransactionScopeOptions(ITransactionDefinition definition) + { + TransactionScopeOption txScopeOption; + if (definition.PropagationBehavior == TransactionPropagation.Required) + { + txScopeOption = TransactionScopeOption.Required; + } + else if (definition.PropagationBehavior == TransactionPropagation.RequiresNew) + { + txScopeOption = TransactionScopeOption.RequiresNew; + } + else if (definition.PropagationBehavior == TransactionPropagation.NotSupported) + { + txScopeOption = TransactionScopeOption.Suppress; + } + else + { + throw new Spring.Transaction.TransactionSystemException("Transaction Propagation Behavior" + + definition.PropagationBehavior + + " not supported by TransactionScope. Use Required or RequiredNew"); + } + return txScopeOption; + } + + + private static TransactionOptions CreateTransactionOptions(ITransactionDefinition definition) + { + TransactionOptions txOptions = new TransactionOptions(); + switch (definition.TransactionIsolationLevel) + { + case System.Data.IsolationLevel.Chaos: + txOptions.IsolationLevel = System.Transactions.IsolationLevel.Chaos; + break; + case System.Data.IsolationLevel.ReadCommitted: + txOptions.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted; + break; + case System.Data.IsolationLevel.ReadUncommitted: + txOptions.IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted; + break; + case System.Data.IsolationLevel.RepeatableRead: + txOptions.IsolationLevel = System.Transactions.IsolationLevel.RepeatableRead; + break; + case System.Data.IsolationLevel.Serializable: + txOptions.IsolationLevel = System.Transactions.IsolationLevel.Serializable; + break; + case System.Data.IsolationLevel.Snapshot: + txOptions.IsolationLevel = System.Transactions.IsolationLevel.Snapshot; + break; + case System.Data.IsolationLevel.Unspecified: + txOptions.IsolationLevel = System.Transactions.IsolationLevel.Unspecified; + break; + } + + if (definition.TransactionTimeout != DefaultTransactionDefinition.TIMEOUT_DEFAULT) + { + txOptions.Timeout = new TimeSpan(0, 0, definition.TransactionTimeout); + } + return txOptions; + } + + + + /// + /// Suspend the resources of the current transaction. + /// + /// + /// Transaction object returned by + /// . + /// + /// + /// An object that holds suspended resources (will be kept unexamined for passing it into + /// .) + /// + /// + /// Transaction synchronization will already have been suspended. + /// + /// + /// If suspending is not supported by the transaction manager implementation. + /// + /// + /// in case of system errors. + /// + protected override object DoSuspend(object transaction) + { + HibernateTransactionObject txObject = (HibernateTransactionObject)transaction; + txObject.SetSessionHolder(null, false); + SessionHolder sessionHolder = + (SessionHolder)TransactionSynchronizationManager.UnbindResource(SessionFactory); + ConnectionHolder connectionHolder = null; + if (DbProvider != null) + { + connectionHolder = (ConnectionHolder)TransactionSynchronizationManager.UnbindResource(DbProvider); + } + return new SuspendedResourcesHolder(sessionHolder, connectionHolder); + + } + + /// + /// Resume the resources of the current transaction. + /// + /// + /// Transaction object returned by + /// . + /// + /// + /// The object that holds suspended resources as returned by + /// . + /// + /// + /// Transaction synchronization will be resumed afterwards. + /// + /// + /// If suspending is not supported by the transaction manager implementation. + /// + /// + /// In the case of system errors. + /// + protected override void DoResume(object transaction, object suspendedResources) + { + SuspendedResourcesHolder resourcesHolder = (SuspendedResourcesHolder)suspendedResources; + if (TransactionSynchronizationManager.HasResource(SessionFactory)) + { + // From non-transactional code running in active transaction synchronization + // -> can be safely removed, will be closed on transaction completion. + TransactionSynchronizationManager.UnbindResource(SessionFactory); + } + TransactionSynchronizationManager.BindResource(SessionFactory, resourcesHolder.SessionHolder); + if (DbProvider != null) + { + TransactionSynchronizationManager.BindResource(DbProvider, resourcesHolder.ConnectionHolder); + } + } + + /// + /// Perform an actual commit on the given transaction. + /// + /// The status representation of the transaction. + /// + ///

+ /// An implementation does not need to check the rollback-only flag. + ///

+ ///
+ /// + /// In the case of system errors. + /// + protected override void DoCommit(DefaultTransactionStatus status) + { + HibernateTransactionObject txObject = (HibernateTransactionObject)status.Transaction; + if (status.Debug) + { + log.Debug("Committing Hibernate transaction on Session [" + + txObject.SessionHolder.Session + "]"); + } + try + { + txObject.SessionHolder.Transaction.Commit(); + } + // Note, unfortunate collision of namespaces/classname for NHibernate.TransactionException + // and Spring.Data.NHibernate requires this wierd construct. + catch (Exception ex) + { + Type nhibTxExceptiontype = TypeResolutionUtils.ResolveType("NHibernate.TransactionException, NHibernate"); + if (ex.GetType().Equals(nhibTxExceptiontype)) + { + // assumably from commit call to the underlying ADO.NET connection + throw new TransactionSystemException("Could not commit Hibernate transaction", ex); + } + HibernateException hibEx = ex as HibernateException; + if (hibEx != null) + { + // assumably failed to flush changes to database + throw ConvertHibernateAccessException(hibEx); + } + throw; + } + finally + { + DoTxScopeCommit(status); + } + + + + } + + /// + /// Does the tx scope commit. + /// + /// The status. + protected void DoTxScopeCommit(DefaultTransactionStatus status) + { + TxScopeTransactionManager.PromotableTxScopeTransactionObject txObject = + ((HibernateTransactionObject)status.Transaction).PromotableTxScopeTransactionObject; + try + { + txObject.TxScopeAdapter.Complete(); + txObject.TxScopeAdapter.Dispose(); + } + catch (TransactionAbortedException ex) + { + throw new UnexpectedRollbackException("Transaction unexpectedly rolled back (maybe due to a timeout)", ex); + } + catch (TransactionInDoubtException ex) + { + throw new HeuristicCompletionException(TransactionOutcomeState.Unknown, ex); + } + catch (Exception ex) + { + throw new TransactionSystemException("Failure on Transaction Scope Commit", ex); + } + } + + /// + /// Perform an actual rollback on the given transaction. + /// + /// The status representation of the transaction. + /// + /// An implementation does not need to check the new transaction flag. + /// + /// + /// In the case of system errors. + /// + protected override void DoRollback(DefaultTransactionStatus status) + { + HibernateTransactionObject txObject = (HibernateTransactionObject)status.Transaction; + + if (!txObject.NewSessionHolder) + { + // Clear all pending inserts/updates/deletes in the Session. + // Necessary for pre-bound Sessions, to avoid inconsistent state. + txObject.SessionHolder.Session.Clear(); + } + + DoTxScopeRollback(status); + return; + + + /* HibernateTransactionObject txObject = (HibernateTransactionObject)status.Transaction; + + if (status.Debug) + { + log.Debug("Rolling back Hibernate transaction on Session [" + + txObject.SessionHolder.Session + "]"); + } + try + { + if (txObject.SessionHolder.Session != null && txObject.SessionHolder.Transaction != null && !txObject.SessionHolder.Transaction.IsActive) + { + return; + } + + IDbTransaction adoTx = GetIDbTransaction(txObject.SessionHolder.Transaction); + + if (adoTx != null && adoTx.Connection != null) + { + txObject.SessionHolder.Transaction.Rollback(); + } + else + { + if (status.Debug) + { + log.Debug("Unable to RollBack Hibernate transaction; connection for Hibernate transaction on Session [" + + txObject.SessionHolder.Session + "] was null"); + } + } + + } + catch (HibernateTransactionException ex) + { + throw new TransactionSystemException("Could not roll back Hibernate transaction", ex); + } + catch (HibernateException ex) + { + // Shouldn't really happen, as a rollback doesn't cause a flush. + throw ConvertHibernateAccessException(ex); + } + finally + { + if (!txObject.NewSessionHolder) + { + // Clear all pending inserts/updates/deletes in the Session. + // Necessary for pre-bound Sessions, to avoid inconsistent state. + txObject.SessionHolder.Session.Clear(); + } + DoTxScopeRollback(status); + }*/ + } + + /// + /// Does the tx scope rollback. + /// + /// The status. + protected void DoTxScopeRollback(DefaultTransactionStatus status) + { + TxScopeTransactionManager.PromotableTxScopeTransactionObject txObject = + ((HibernateTransactionObject)status.Transaction).PromotableTxScopeTransactionObject; + + try + { + + txObject.TxScopeAdapter.Dispose(); + } + catch (Exception e) + { + throw new Spring.Transaction.TransactionSystemException("Failure on Transaction Scope rollback.", e); + } + } + + /// + /// Set the given transaction rollback-only. Only called on rollback + /// if the current transaction takes part in an existing one. + /// + /// The status representation of the transaction. + /// + /// In the case of system errors. + /// + protected override void DoSetRollbackOnly(DefaultTransactionStatus status) + { + HibernateTransactionObject txObject = (HibernateTransactionObject)status.Transaction; + if (status.Debug) + { + log.Debug("Setting Hibernate transaction on Session [" + + txObject.SessionHolder.Session + "] rollback-only"); + } + txObject.SetRollbackOnly(); + + DoTxScopeSetRollbackOnly(status); + } + + /// + /// Does the tx scope set rollback only. + /// + /// The status. + protected void DoTxScopeSetRollbackOnly(DefaultTransactionStatus status) + { + if (status.Debug) + { + log.Debug("Setting transaction rollback-only"); + } + try + { + System.Transactions.Transaction.Current.Rollback(); + } + catch (Exception ex) + { + throw new TransactionSystemException("Failure on System.Transactions.Transaction.Current.Rollback", ex); + } + } + + + /// + /// Gets the ADO.NET IDbTransaction object from the NHibernate ITransaction object. + /// + /// The hibernate transaction. + /// The ADO.NET transaction. Null if could not get the transaction. Warning + /// messages will be logged in that case. + protected IDbTransaction GetIDbTransaction(ITransaction hibernateTx) + { + AdoTransaction hibernateAdoTx = hibernateTx as AdoTransaction; + + IDbTransaction adoTransaction = null; + if (hibernateAdoTx != null) + { + try + { + FieldInfo fi = hibernateAdoTx.GetType().GetField("trans", BindingFlags.Instance | BindingFlags.NonPublic); + adoTransaction = fi.GetValue(hibernateAdoTx) as IDbTransaction; + } + catch (Exception e) + { + log.Warn("Could not extract IDbTransaction from Hibernate AdoTransaction using field name trans.", e); + } + } + else + { + log.Warn("Hibernate ITransaction not of expected type AdoTransaction. Could not extract IDbTransaction from Hibernate AdoTransaction."); + } + return adoTransaction; + } + + /// + /// Convert the given HibernateException to an appropriate exception from + /// the Spring.Dao hierarchy. Can be overridden in subclasses. + /// + /// The HibernateException that occured. + /// The corresponding DataAccessException instance + protected virtual DataAccessException ConvertHibernateAccessException(HibernateException ex) + { + if (AdoExceptionTranslator != null && ex is ADOException) + { + return ConvertAdoAccessException((ADOException)ex, AdoExceptionTranslator); + } + else if (ex is ADOException) + { + return ConvertAdoAccessException((ADOException)ex, DefaultAdoExceptionTranslator); + } + return SessionFactoryUtils.ConvertHibernateAccessException(ex); + } + + /// + /// Convert the given ADOException to an appropriate exception from the + /// the Spring.Dao hierarchy. Can be overridden in subclasses. + /// + /// The ADOException that occured, wrapping the underlying + /// ADO.NET thrown exception. + /// The translator to convert hibernate ADOExceptions. + /// + /// The corresponding DataAccessException instance + /// + protected virtual DataAccessException ConvertAdoAccessException(ADOException ex, IAdoExceptionTranslator translator) + { + return translator.Translate("Hibernate flushing: " + ex.Message, null, ex.InnerException); + } + + /// + /// Cleanup resources after transaction completion. + /// + /// Transaction object returned by + /// . + /// + /// + /// This implemenation unbinds the SessionFactory and + /// DbProvider from thread local storage and closes the + /// ISession. + /// + ///

+ /// Called after + /// and + /// + /// execution on any outcome. + ///

+ ///

+ /// Should not throw any exceptions but just issue warnings on errors. + ///

+ ///
+ protected override void DoCleanupAfterCompletion(object transaction) + { + HibernateTransactionObject txObject = (HibernateTransactionObject)transaction; + + // Remove the session holder from the thread. + if (txObject.NewSessionHolder) + { + TransactionSynchronizationManager.UnbindResource(SessionFactory); + } + // Remove the ADO.NET connection holder from the thread, if exposed. + if (DbProvider != null) + { + TransactionSynchronizationManager.UnbindResource(DbProvider); + } + /* + try + { + //TODO investigate isolation level settings... + //IDbConnection con = txObject.SessionHolder.Session.Connection; + //AdoUtils.ResetConnectionAfterTransaction(con, txObject.PreviousIsolationLevel); + } + catch (HibernateException ex) + { + log.Info("Could not access ADO.NET IDbConnection of Hibernate Session", ex); + } + */ + ISession session = txObject.SessionHolder.Session; + if (txObject.NewSessionHolder) + { + if (log.IsDebugEnabled) + { + log.Debug("Closing Hibernate Session [" + session + "] after transaction"); + } + // SessionFactoryUtils.CloseSessionOrRegisterDeferredClose(session, SessionFactory); + // NOTE: The above line has to be called via reflection since it is an internal method + SessionFactoryUtils_CloseSessionOrRegisterDeferredClose_Method.Invoke(null, BindingFlags.InvokeMethod | BindingFlags.Static | BindingFlags.NonPublic, null, new object[] { session, SessionFactory }, null); + } + else + { + if (log.IsDebugEnabled) + { + log.Debug("Not closing pre-bound Hibernate Session [" + session + "] after transaction"); + } + if (txObject.SessionHolder.AssignedPreviousFlushMode) + { + session.FlushMode = txObject.SessionHolder.PreviousFlushMode; + } + } + txObject.SessionHolder.Clear(); + + + } + + private class HibernateTransactionObject : AdoTransactionObjectSupport + { + + private SessionHolder sessionHolder; + + private bool newSessionHolder; + + private TxScopeTransactionManager.PromotableTxScopeTransactionObject promotableTxScopeTransactionObject; + + + public void SetSessionHolder(SessionHolder sessionHolder, bool newSessionHolder) + { + this.sessionHolder = sessionHolder; + this.newSessionHolder = newSessionHolder; + } + + public TxScopeTransactionManager.PromotableTxScopeTransactionObject PromotableTxScopeTransactionObject + { + get { return promotableTxScopeTransactionObject; } + set { this.promotableTxScopeTransactionObject = value; } + } + + public SessionHolder SessionHolder + { + get + { + return sessionHolder; + } + } + + public bool NewSessionHolder + { + get + { + return newSessionHolder; + } + } + + public bool HasTransaction() + { + return (this.sessionHolder != null && this.sessionHolder.Transaction != null); + } + + public void SetRollbackOnly() + { + if (SessionHolder != null) + { + SessionHolder.RollbackOnly = true; + } + if (ConnectionHolder != null) + { + ConnectionHolder.RollbackOnly = true; + } + } + + /// + /// Return whether the transaction is internally marked as rollback-only. + /// + /// + /// True of the transaction is marked as rollback-only. + public override bool RollbackOnly + { + get + { + return ((SessionHolder != null && SessionHolder.RollbackOnly) || + (ConnectionHolder != null && ConnectionHolder.RollbackOnly)); + } + } + } + + private class SuspendedResourcesHolder + { + + private readonly SessionHolder sessionHolder; + + private readonly ConnectionHolder connectionHolder; + + public SuspendedResourcesHolder(SessionHolder sessionHolder, ConnectionHolder conHolder) + { + this.sessionHolder = sessionHolder; + this.connectionHolder = conHolder; + } + + public SessionHolder SessionHolder + { + get + { + return sessionHolder; + } + + } + + public ConnectionHolder ConnectionHolder + { + get + { + return connectionHolder; + } + + } + } + + /// + /// Invoked by an + /// after it has injected all of an object's dependencies. + /// + /// + ///

+ /// This method allows the object instance to perform the kind of + /// initialization only possible when all of it's dependencies have + /// been injected (set), and to throw an appropriate exception in the + /// event of misconfiguration. + ///

+ ///

+ /// Please do consult the class level documentation for the + /// interface for a + /// description of exactly when this method is invoked. In + /// particular, it is worth noting that the + /// + /// and + /// callbacks will have been invoked prior to this method being + /// called. + ///

+ ///
+ /// + /// In the event of misconfiguration (such as the failure to set a + /// required property) or if initialization fails. + /// + public void AfterPropertiesSet() + { + if (SessionFactory == null) + { + throw new ArgumentException("sessionFactory is required"); + } + if (this.entityInterceptor is string && this.objectFactory == null) + { + throw new ArgumentException("objectFactory is required for entityInterceptorBeanName"); + } + + // Try to derive a DbProvider given the SessionFactory. + if (this.autodetectDbProvider && DbProvider == null) + { + IDbProvider sfDbProvider = SessionFactoryUtils.GetDbProvider(SessionFactory); + if (sfDbProvider != null) + { + // Use the SessionFactory's DataSource for exposing transactions to ADO.NET code. + if (log.IsInfoEnabled) + { + log.Info("Derived DbProvider [" + sfDbProvider.DbMetadata.ProductName + + "] of Hibernate SessionFactory for HibernateTransactionManager"); + } + DbProvider = sfDbProvider; + } + else + { + log.Info("Could not auto detect DbProvider from SessionFactory configuration"); + } + + } + } + + private static string WriteTransactionInformation(System.Transactions.Transaction tx) + { + if (tx == null) + { + return "NULL"; + } + + string isoLevel = System.Transactions.Transaction.Current.IsolationLevel.ToString(); + TransactionInformation txInfo = System.Transactions.Transaction.Current.TransactionInformation; + return string.Format("{{LocalId = {0}, DistributedId = {1}, Status = {2}, IsolationLevel = {3}, CreationTime = {4}}}", txInfo.LocalIdentifier, txInfo.DistributedIdentifier, txInfo.Status, isoLevel, txInfo.CreationTime.ToString("o")); + } + + } +} diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/IService1.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/IService1.cs index 866f13b8..29ce356a 100644 --- a/test/Spring/Spring.SessionFactoryImplError.Tests/IService1.cs +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/IService1.cs @@ -2,8 +2,14 @@ { public interface IService1 { - void ServiceMethod1(); + void ServiceMethodWithNotSupported1(); - void ServiceMethod2(); + void ServiceMethodWithNotSupported2(); + + void ServiceMethodWithNotSupported3(); + + void ServiceMethodWithNotSupported4(); + + void ServiceMethodWithRequired(); } } diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/IService2.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/IService2.cs index 9031a68f..0b82a843 100644 --- a/test/Spring/Spring.SessionFactoryImplError.Tests/IService2.cs +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/IService2.cs @@ -2,8 +2,8 @@ { public interface IService2 { - void ServiceMethod1(); + void ServiceMethodWithNotSupported(); - void ServiceMethod2(); + void ServiceMethodWithRequiresNew(); } } diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Service1.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/Service1.cs index 54be54ce..48642c57 100644 --- a/test/Spring/Spring.SessionFactoryImplError.Tests/Service1.cs +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Service1.cs @@ -13,13 +13,31 @@ namespace Spring.SessionFactoryImplError.Tests #endregion [Transaction.Interceptor.Transaction(TransactionPropagation.NotSupported)] - public virtual void ServiceMethod1() + public virtual void ServiceMethodWithNotSupported1() { - ServiceMethod2(); + ServiceMethodWithNotSupported2(); } [Transaction.Interceptor.Transaction(TransactionPropagation.NotSupported)] - public virtual void ServiceMethod2() + public virtual void ServiceMethodWithNotSupported2() + { + // do some stuff + } + + [Transaction.Interceptor.Transaction(TransactionPropagation.NotSupported)] + public virtual void ServiceMethodWithNotSupported3() + { + ServiceMethodWithNotSupported4(); + } + + [Transaction.Interceptor.Transaction(TransactionPropagation.NotSupported)] + public virtual void ServiceMethodWithNotSupported4() + { + ServiceMethodWithRequired(); + } + + [Transaction.Interceptor.Transaction(TransactionPropagation.Required)] + public virtual void ServiceMethodWithRequired() { // do some stuff } diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Service2.cs b/test/Spring/Spring.SessionFactoryImplError.Tests/Service2.cs index 5de7a2cc..32b03572 100644 --- a/test/Spring/Spring.SessionFactoryImplError.Tests/Service2.cs +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Service2.cs @@ -13,13 +13,13 @@ namespace Spring.SessionFactoryImplError.Tests #endregion [Transaction.Interceptor.Transaction(TransactionPropagation.NotSupported)] - public virtual void ServiceMethod1() + public virtual void ServiceMethodWithNotSupported() { - ServiceMethod2(); + ServiceMethodWithRequiresNew(); } [Transaction.Interceptor.Transaction(TransactionPropagation.RequiresNew)] - public virtual void ServiceMethod2() + public virtual void ServiceMethodWithRequiresNew() { // do stuff } diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.Configuration.xml b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.Configuration.xml index feac28c9..7334480a 100644 --- a/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.Configuration.xml +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.Configuration.xml @@ -8,11 +8,6 @@ - - - - - diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.CustomHibernateTxScopeTransactionManager.xml b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.CustomHibernateTxScopeTransactionManager.xml new file mode 100644 index 00000000..5657013e --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.CustomHibernateTxScopeTransactionManager.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.HibernateTxScopeTransactionManager.xml b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.HibernateTxScopeTransactionManager.xml new file mode 100644 index 00000000..d4d6fa3b --- /dev/null +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.HibernateTxScopeTransactionManager.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.SessionFactoryImplError.Tests.csproj b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.SessionFactoryImplError.Tests.csproj index 96a02f23..9b6c8909 100644 --- a/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.SessionFactoryImplError.Tests.csproj +++ b/test/Spring/Spring.SessionFactoryImplError.Tests/Spring.SessionFactoryImplError.Tests.csproj @@ -47,6 +47,7 @@ + @@ -55,10 +56,12 @@ + + - + @@ -95,6 +98,8 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 45e67d88dd2bb315725b1f3ae405ee2d4ecd1ffc Mon Sep 17 00:00:00 2001 From: Steve Bohlen Date: Fri, 27 Mar 2015 17:41:37 -0400 Subject: [PATCH 15/16] renaming project to identify specifically as NHibernate4 --- Spring.Net.2010.sln | 2 +- Spring.build | 8 ++++---- .../App.config | 4 ++-- .../Container.cs | 2 +- ...eTransactionManagerNestedTransactionSuspensionTests.cs | 8 ++++---- .../IContainer.cs | 2 +- .../IService1.cs | 2 +- .../IService2.cs | 2 +- .../Mappings.hbm.xml | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Service1.cs | 4 ++-- .../Service2.cs | 4 ++-- .../Spring.Configuration.xml | 4 ++-- ...Hibernate4.NestedTxSuspension.Integration.Tests.build} | 6 +++--- ...ibernate4.NestedTxSuspension.Integration.Tests.csproj} | 4 ++-- .../Spring.HibernateTxScopeTransactionManager.xml | 0 .../Spring.NHibernate.xml | 2 +- 17 files changed, 29 insertions(+), 29 deletions(-) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/App.config (86%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/Container.cs (68%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/HibernateTxScopeTransactionManagerNestedTransactionSuspensionTests.cs (62%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/IContainer.cs (64%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/IService1.cs (79%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/IService2.cs (65%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/Mappings.hbm.xml (64%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/Properties/AssemblyInfo.cs (62%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/Service1.cs (89%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/Service2.cs (81%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/Spring.Configuration.xml (81%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests.build => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests.build} (86%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests.csproj => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests.csproj} (96%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/Spring.HibernateTxScopeTransactionManager.xml (100%) rename test/Spring/{Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests => Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests}/Spring.NHibernate.xml (91%) diff --git a/Spring.Net.2010.sln b/Spring.Net.2010.sln index 1ee6b799..15e4d62b 100644 --- a/Spring.Net.2010.sln +++ b/Spring.Net.2010.sln @@ -105,7 +105,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate4.Tes EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate4.Integration.Tests.2010", "test\Spring\Spring.Data.NHibernate4.Integration.Tests\Spring.Data.NHibernate4.Integration.Tests.2010.csproj", "{46F8B5E9-ABCF-4306-BC05-FF05B0FAC151}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests", "test\Spring\Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests\Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests.csproj", "{DE276F7C-4564-49EC-AABC-B964EC3D1626}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests", "test\Spring\Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests\Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests.csproj", "{DE276F7C-4564-49EC-AABC-B964EC3D1626}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Spring.build b/Spring.build index 9f389069..87a5ae31 100644 --- a/Spring.build +++ b/Spring.build @@ -540,7 +540,7 @@ Commandline Examples: - + @@ -905,8 +905,8 @@ Commandline Examples: - - + + @@ -1861,7 +1861,7 @@ Commandline Examples: - + diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/App.config b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/App.config similarity index 86% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/App.config rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/App.config index 9fb793b7..3feb6038 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/App.config +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/App.config @@ -15,8 +15,8 @@ - - + + diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Container.cs b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Container.cs similarity index 68% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Container.cs rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Container.cs index 0c03fe78..981767a2 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Container.cs +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Container.cs @@ -1,6 +1,6 @@ using System; -namespace Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests +namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests { public class Container : IContainer { diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/HibernateTxScopeTransactionManagerNestedTransactionSuspensionTests.cs b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/HibernateTxScopeTransactionManagerNestedTransactionSuspensionTests.cs similarity index 62% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/HibernateTxScopeTransactionManagerNestedTransactionSuspensionTests.cs rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/HibernateTxScopeTransactionManagerNestedTransactionSuspensionTests.cs index e4d8df0a..55e05c9a 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/HibernateTxScopeTransactionManagerNestedTransactionSuspensionTests.cs +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/HibernateTxScopeTransactionManagerNestedTransactionSuspensionTests.cs @@ -2,7 +2,7 @@ using Spring.Testing.NUnit; -namespace Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests +namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests { [TestFixture] public class HibernateTxScopeTransactionManagerNestedTransactionSuspensionTests : AbstractTransactionalSpringContextTests @@ -21,9 +21,9 @@ namespace Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests return new[] { "config://spring/objects", - "assembly://Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Configuration.xml", - "assembly://Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.NHibernate.xml", - "assembly://Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.HibernateTxScopeTransactionManager.xml" + "assembly://Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Configuration.xml", + "assembly://Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.NHibernate.xml", + "assembly://Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.HibernateTxScopeTransactionManager.xml" }; } } diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/IContainer.cs b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/IContainer.cs similarity index 64% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/IContainer.cs rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/IContainer.cs index a8fffcd0..82264794 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/IContainer.cs +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/IContainer.cs @@ -1,6 +1,6 @@ using System; -namespace Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests +namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests { public interface IContainer { diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/IService1.cs b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/IService1.cs similarity index 79% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/IService1.cs rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/IService1.cs index 1954d7eb..330273be 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/IService1.cs +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/IService1.cs @@ -1,4 +1,4 @@ -namespace Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests +namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests { public interface IService1 { diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/IService2.cs b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/IService2.cs similarity index 65% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/IService2.cs rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/IService2.cs index 9d47a7cb..c0499435 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/IService2.cs +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/IService2.cs @@ -1,4 +1,4 @@ -namespace Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests +namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests { public interface IService2 { diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Mappings.hbm.xml b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Mappings.hbm.xml similarity index 64% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Mappings.hbm.xml rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Mappings.hbm.xml index 25d7f4bd..f90a7070 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Mappings.hbm.xml +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Mappings.hbm.xml @@ -1,5 +1,5 @@  - + diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Properties/AssemblyInfo.cs b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Properties/AssemblyInfo.cs similarity index 62% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Properties/AssemblyInfo.cs rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Properties/AssemblyInfo.cs index c0677e1c..53078829 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Properties/AssemblyInfo.cs +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ using System.Reflection; -[assembly: AssemblyTitle("Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests")] +[assembly: AssemblyTitle("Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests")] [assembly: AssemblyDescription("Integration tests for HibernteTxScopeTransactionManager suspension of transactions")] diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Service1.cs b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Service1.cs similarity index 89% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Service1.cs rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Service1.cs index adf6317e..c0ff827d 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Service1.cs +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Service1.cs @@ -1,14 +1,14 @@ using Spring.Data.NHibernate.Generic; using Spring.Transaction; -namespace Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests +namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests { [Transaction.Interceptor.Transaction(TransactionPropagation.Supports, ReadOnly = true)] public class Service1 : IService1 { #region DI - public Generic.HibernateTemplate HibernateTemplate { get; set; } + public HibernateTemplate HibernateTemplate { get; set; } #endregion diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Service2.cs b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Service2.cs similarity index 81% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Service2.cs rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Service2.cs index d2052dbc..968e92e2 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Service2.cs +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Service2.cs @@ -1,14 +1,14 @@ using Spring.Data.NHibernate.Generic; using Spring.Transaction; -namespace Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests +namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests { [Transaction.Interceptor.Transaction(TransactionPropagation.Supports, ReadOnly = true)] public class Service2 : IService2 { #region DI - public Generic.HibernateTemplate HibernateTemplate { get; set; } + public HibernateTemplate HibernateTemplate { get; set; } #endregion diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Configuration.xml b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Configuration.xml similarity index 81% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Configuration.xml rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Configuration.xml index ae42f85f..ae0bbe88 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Configuration.xml +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Configuration.xml @@ -26,11 +26,11 @@ - + - + diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests.build b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests.build similarity index 86% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests.build rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests.build index fde59f27..5f18d163 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests.build +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests.build @@ -1,5 +1,5 @@ - + + - + diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests.csproj b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests.csproj similarity index 96% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests.csproj rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests.csproj index 8bcde6a1..c329d390 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests.csproj +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests.csproj @@ -7,8 +7,8 @@ {DE276F7C-4564-49EC-AABC-B964EC3D1626} Library Properties - Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests - Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests + Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests + Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests v4.5 512 diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.HibernateTxScopeTransactionManager.xml b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.HibernateTxScopeTransactionManager.xml similarity index 100% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.HibernateTxScopeTransactionManager.xml rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.HibernateTxScopeTransactionManager.xml diff --git a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.NHibernate.xml b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.NHibernate.xml similarity index 91% rename from test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.NHibernate.xml rename to test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.NHibernate.xml index 6e31c2c7..52829b7b 100644 --- a/test/Spring/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.NHibernate.xml +++ b/test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.NHibernate.xml @@ -27,7 +27,7 @@ - assembly://Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate.NestedTxSuspension.Integration.Tests/Mappings.hbm.xml + assembly://Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Mappings.hbm.xml From c70a70037c7b98a81fafac3cfca4506d9bba8207 Mon Sep 17 00:00:00 2001 From: Steve Bohlen Date: Fri, 27 Mar 2015 21:45:19 -0400 Subject: [PATCH 16/16] update metadata to reflect 2.0.0.GA --- build-release-all.cmd | 3 ++- changelog.txt | 9 +++++++++ src/Spring/Spring.Aop/Spring.Aop.nuspec | 2 +- .../Spring.Data.NHibernate3.nuspec | 6 +++--- .../Spring.Data.NHibernate4.nuspec | 6 +++--- src/Spring/Spring.Data/Spring.Data.nuspec | 4 ++-- .../Spring.Messaging.Ems/Spring.Messaging.Ems.nuspec | 4 ++-- .../Spring.Messaging.Nms/Spring.Messaging.Nms.nuspec | 4 ++-- src/Spring/Spring.Messaging/Spring.Messaging.nuspec | 4 ++-- .../Spring.Scheduling.Quartz2.nuspec | 4 ++-- src/Spring/Spring.Services/Spring.Services.nuspec | 2 +- .../Spring.Template.Velocity.nuspec | 2 +- .../Spring.Testing.Microsoft.nuspec | 4 ++-- .../Spring.Testing.NUnit/Spring.Testing.NUnit.nuspec | 4 ++-- .../Spring.Web.Conversation.NHibernate3.nuspec | 2 +- .../Spring.Web.Extensions/Spring.Web.Extensions.nuspec | 4 ++-- src/Spring/Spring.Web.Mvc3/Spring.Web.Mvc3.nuspec | 4 ++-- src/Spring/Spring.Web.Mvc4/Spring.Web.Mvc4.nuspec | 4 ++-- src/Spring/Spring.Web.Mvc5/Spring.Web.Mvc5.nuspec | 4 ++-- src/Spring/Spring.Web/Spring.Web.nuspec | 2 +- 20 files changed, 44 insertions(+), 34 deletions(-) diff --git a/build-release-all.cmd b/build-release-all.cmd index 1837c845..af5b1337 100644 --- a/build-release-all.cmd +++ b/build-release-all.cmd @@ -7,7 +7,8 @@ cd .. @echo ... @echo Running full Build Script, capturing output to buildlog.txt file... @echo Start Time: %time% -build-support\tools\nant\bin\nant clean package -f:spring.build -D:project.build.sign=true -D:build-ems=true -D:test.integration.ems=false -D:test.integration.data=true -D:mstest.exe="c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\mstest.exe" -D:package.version=2.0.0 -D:nuget.version.suffix=RC2 -D:vs-net.mstest.bin.dir="c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE" -D:skipmstestrun=true > buildlog.txt +build-support\tools\nant\bin\nant clean package -f:spring.build -D:project.build.sign=true -D:build-ems=true -D:test.integration.ems=false -D:test.integration.data=true -D:mstest.exe="c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\mstest.exe" -D:package.version=2.0.0 -D:vs-net.mstest.bin.dir="c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE" -D:skipmstestrun=true > buildlog.txt +rem for reference, package suffix arg = -D:nuget.version.suffix=RC2 @echo . @echo .. @echo ... diff --git a/changelog.txt b/changelog.txt index 4c34cd02..84eae382 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,15 @@ SPRING.NET FRAMEWORK CHANGELOG ============================== http://www.springframework.net +***************************************************************************************** +Release Version 2.0.0 March 27, 2015 + +Release Notes - Spring.NET - Version 2.0.0 + + + + + ***************************************************************************************** Release Version 1.3.2 August 1, 2011 diff --git a/src/Spring/Spring.Aop/Spring.Aop.nuspec b/src/Spring/Spring.Aop/Spring.Aop.nuspec index 7b818fee..1b0d948d 100644 --- a/src/Spring/Spring.Aop/Spring.Aop.nuspec +++ b/src/Spring/Spring.Aop/Spring.Aop.nuspec @@ -14,7 +14,7 @@ en-US - + diff --git a/src/Spring/Spring.Data.NHibernate3/Spring.Data.NHibernate3.nuspec b/src/Spring/Spring.Data.NHibernate3/Spring.Data.NHibernate3.nuspec index 2da6b6e2..adc5c59e 100644 --- a/src/Spring/Spring.Data.NHibernate3/Spring.Data.NHibernate3.nuspec +++ b/src/Spring/Spring.Data.NHibernate3/Spring.Data.NHibernate3.nuspec @@ -15,9 +15,9 @@ - - - + + + diff --git a/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.nuspec b/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.nuspec index 5281d204..483e5689 100644 --- a/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.nuspec +++ b/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.nuspec @@ -15,9 +15,9 @@ - - - + + + diff --git a/src/Spring/Spring.Data/Spring.Data.nuspec b/src/Spring/Spring.Data/Spring.Data.nuspec index 42c5c045..c927c461 100644 --- a/src/Spring/Spring.Data/Spring.Data.nuspec +++ b/src/Spring/Spring.Data/Spring.Data.nuspec @@ -14,8 +14,8 @@ en-US - - + + diff --git a/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.nuspec b/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.nuspec index 758ec2b8..486804ad 100644 --- a/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.nuspec +++ b/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.nuspec @@ -14,8 +14,8 @@ en-US - - + + diff --git a/src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.nuspec b/src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.nuspec index 14a59d37..dd225659 100644 --- a/src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.nuspec +++ b/src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.nuspec @@ -15,8 +15,8 @@ - - + + diff --git a/src/Spring/Spring.Messaging/Spring.Messaging.nuspec b/src/Spring/Spring.Messaging/Spring.Messaging.nuspec index 1be161b5..18736da3 100644 --- a/src/Spring/Spring.Messaging/Spring.Messaging.nuspec +++ b/src/Spring/Spring.Messaging/Spring.Messaging.nuspec @@ -14,8 +14,8 @@ en-US - - + + diff --git a/src/Spring/Spring.Scheduling.Quartz2/Spring.Scheduling.Quartz2.nuspec b/src/Spring/Spring.Scheduling.Quartz2/Spring.Scheduling.Quartz2.nuspec index fe5295cb..949adb9f 100644 --- a/src/Spring/Spring.Scheduling.Quartz2/Spring.Scheduling.Quartz2.nuspec +++ b/src/Spring/Spring.Scheduling.Quartz2/Spring.Scheduling.Quartz2.nuspec @@ -15,8 +15,8 @@ - - + + diff --git a/src/Spring/Spring.Services/Spring.Services.nuspec b/src/Spring/Spring.Services/Spring.Services.nuspec index ea9b7135..8c6f2b86 100644 --- a/src/Spring/Spring.Services/Spring.Services.nuspec +++ b/src/Spring/Spring.Services/Spring.Services.nuspec @@ -14,7 +14,7 @@ en-US - + diff --git a/src/Spring/Spring.Template.Velocity/Spring.Template.Velocity.nuspec b/src/Spring/Spring.Template.Velocity/Spring.Template.Velocity.nuspec index e2799c02..970248c9 100644 --- a/src/Spring/Spring.Template.Velocity/Spring.Template.Velocity.nuspec +++ b/src/Spring/Spring.Template.Velocity/Spring.Template.Velocity.nuspec @@ -14,7 +14,7 @@ - + diff --git a/src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.nuspec b/src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.nuspec index 126a2bb0..5eeaa665 100644 --- a/src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.nuspec +++ b/src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.nuspec @@ -14,8 +14,8 @@ en-US - - + + diff --git a/src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.nuspec b/src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.nuspec index 3c072084..e642198e 100644 --- a/src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.nuspec +++ b/src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.nuspec @@ -15,8 +15,8 @@ - - + + diff --git a/src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate3.nuspec b/src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate3.nuspec index 9d3839e8..e0e11b8d 100644 --- a/src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate3.nuspec +++ b/src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate3.nuspec @@ -13,7 +13,7 @@ en-US - + diff --git a/src/Spring/Spring.Web.Extensions/Spring.Web.Extensions.nuspec b/src/Spring/Spring.Web.Extensions/Spring.Web.Extensions.nuspec index ed851405..27976968 100644 --- a/src/Spring/Spring.Web.Extensions/Spring.Web.Extensions.nuspec +++ b/src/Spring/Spring.Web.Extensions/Spring.Web.Extensions.nuspec @@ -13,8 +13,8 @@ Interfaces and classes that provide ASP.NET AJAX 1.0 support in Spring.Net en-US - - + + diff --git a/src/Spring/Spring.Web.Mvc3/Spring.Web.Mvc3.nuspec b/src/Spring/Spring.Web.Mvc3/Spring.Web.Mvc3.nuspec index aa17705a..e32b19de 100644 --- a/src/Spring/Spring.Web.Mvc3/Spring.Web.Mvc3.nuspec +++ b/src/Spring/Spring.Web.Mvc3/Spring.Web.Mvc3.nuspec @@ -13,8 +13,8 @@ en-US - - + + diff --git a/src/Spring/Spring.Web.Mvc4/Spring.Web.Mvc4.nuspec b/src/Spring/Spring.Web.Mvc4/Spring.Web.Mvc4.nuspec index 9c25340e..8d5b4ed0 100644 --- a/src/Spring/Spring.Web.Mvc4/Spring.Web.Mvc4.nuspec +++ b/src/Spring/Spring.Web.Mvc4/Spring.Web.Mvc4.nuspec @@ -13,8 +13,8 @@ en-US - - + + diff --git a/src/Spring/Spring.Web.Mvc5/Spring.Web.Mvc5.nuspec b/src/Spring/Spring.Web.Mvc5/Spring.Web.Mvc5.nuspec index b310a20f..56678030 100644 --- a/src/Spring/Spring.Web.Mvc5/Spring.Web.Mvc5.nuspec +++ b/src/Spring/Spring.Web.Mvc5/Spring.Web.Mvc5.nuspec @@ -13,8 +13,8 @@ en-US - - + + diff --git a/src/Spring/Spring.Web/Spring.Web.nuspec b/src/Spring/Spring.Web/Spring.Web.nuspec index e5daebcc..28f894b1 100644 --- a/src/Spring/Spring.Web/Spring.Web.nuspec +++ b/src/Spring/Spring.Web/Spring.Web.nuspec @@ -14,7 +14,7 @@ en-US - +