Merge branch 'master' of https://github.com/spring-projects/spring-net into spring-projects-master
Conflicts: Spring.Net.2010.sln
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
Changes (1.3.2 to 2.0)
|
||||
========================
|
||||
|
||||
1. Default transaction isolation level is now IsolationLevel.Unspecified instead of old IsolationLevel.ReadUncommitted
|
||||
- You need to update your configuration to set the isolation level where old ReadUncommitted was expected, see Spring documentation's Transaction Management chapter
|
||||
|
||||
2. Protected fields were changed to private. Access is now allowed via public/protected property member.
|
||||
1. Protected fields were changed to private. Access is now allowed via public/protected property member.
|
||||
|
||||
3. Most of members marked as Obsolete before 2.0 release were removed.
|
||||
2. Most of members marked as Obsolete before 2.0 release were removed.
|
||||
|
||||
4. DbProvider automatically sets BindByName to true for Oracle's ODP.NET OracleCommand instances when created
|
||||
3. DbProvider automatically sets BindByName to true for Oracle's ODP.NET OracleCommand instances when created
|
||||
|
||||
Changes (1.3.1 to 1.3.2)
|
||||
========================
|
||||
|
||||
@@ -108,6 +108,7 @@ EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Template.Velocity.Castle.2010", "src\Spring\Spring.Template.Velocity.Castle\Spring.Template.Velocity.Castle.2010.csproj", "{250601C0-A4AC-41FE-B484-51A9B0D5473D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Template.Velocity.Castle.Tests.2010", "test\Spring\Spring.Template.Velocity.Castle.Tests\Spring.Template.Velocity.Castle.Tests.2010.csproj", "{8D6ED392-8A1F-41C0-A765-22CF384EDEA1}"
|
||||
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
|
||||
@@ -578,7 +579,17 @@ Global
|
||||
{8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.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
|
||||
|
||||
@@ -540,6 +540,7 @@ Commandline Examples:
|
||||
<nant buildfile="test/Spring/Spring.Data.NHibernate3.Integration.Tests/Spring.Data.NHibernate3.Integration.Tests.build" target="test" if="${build-data}"/>
|
||||
<nant buildfile="test/Spring/Spring.Data.NHibernate4.Tests/Spring.Data.NHibernate4.Tests.build" target="test" if="${build-data}"/>
|
||||
<nant buildfile="test/Spring/Spring.Data.NHibernate4.Integration.Tests/Spring.Data.NHibernate4.Integration.Tests.build" target="test" if="${build-data}"/>
|
||||
<nant buildfile="test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests.build" target="test" if="${build-data and (nant.settings.currentframework == 'net-4.0' or nant.settings.currentframework == 'net-4.5' )}"/>
|
||||
|
||||
<nant buildfile="test/Spring/Spring.Services.Tests/Spring.Services.Tests.build" target="test" if="${build-services}"/>
|
||||
<nant buildfile="test/Spring/Spring.Web.Tests/Spring.Web.Tests.build" target="test" if="${build-web}"/>
|
||||
@@ -904,6 +905,8 @@ Commandline Examples:
|
||||
<delete dir="test/Spring/Spring.Data.NHibernate4.Tests/bin" failonerror="false"/>
|
||||
<delete dir="test/Spring/Spring.Data.NHibernate4.Integration.Tests/obj" failonerror="false"/>
|
||||
<delete dir="test/Spring/Spring.Data.NHibernate4.Integration.Tests/bin" failonerror="false"/>
|
||||
<delete dir="test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/bin" failonerror="false"/>
|
||||
<delete dir="test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/bin" failonerror="false"/>
|
||||
<delete dir="test/Spring/Spring.Services.Tests/obj" failonerror="false"/>
|
||||
<delete dir="test/Spring/Spring.Services.Tests/bin" failonerror="false"/>
|
||||
<delete dir="test/Spring/Spring.Messaging.Nms.Tests/obj" failonerror="false"/>
|
||||
@@ -1858,6 +1861,7 @@ Commandline Examples:
|
||||
<include name="test/Spring/Spring.Data.NHibernate3.Integration.Tests/**"/>
|
||||
<include name="test/Spring/Spring.Data.NHibernate4.Tests/**"/>
|
||||
<include name="test/Spring/Spring.Data.NHibernate4.Integration.Tests/**"/>
|
||||
<include name="test/Spring/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/**"/>
|
||||
<include name="test/Spring/Spring.Messaging.Tests/**"/>
|
||||
<include name="test/Spring/Spring.Messaging.Nms.Tests/**"/>
|
||||
<include name="test/Spring/Spring.Messaging.Nms.Integration.Tests/**"/>
|
||||
|
||||
@@ -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 ...
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1068,7 +1068,7 @@ mgr.DeleteTwoTestObjects("Jack", "Jill");
|
||||
|
||||
<entry>No</entry>
|
||||
|
||||
<entry>Unspecified</entry>
|
||||
<entry>ReadCommitted</entry>
|
||||
|
||||
<entry>The transaction isolation level</entry>
|
||||
</row>
|
||||
@@ -1162,7 +1162,7 @@ mgr.DeleteTwoTestObjects("Jack", "Jill");
|
||||
|
||||
<listitem>
|
||||
<para>The isolation level is
|
||||
<literal>IsolationLevel.Unspecified</literal></para>
|
||||
<literal>IsolationLevel.ReadCommitted</literal></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Spring.Core.IO
|
||||
/// Create an encoded resource, autodetecting the encoding from the resource stream.
|
||||
/// </summary>
|
||||
/// <param name="resource">the resource to read from. Must not be <c>null</c></param>
|
||||
/// <param name="autoDetectEncoding">whether to autoDetect encoding from byte-order marks (<see cref="StreamReader(Stream, Encoding, bool)"/>)</param>
|
||||
/// <param name="autoDetectEncoding">whether to autoDetect encoding from byte-order marks (<see cref="M:StreamReader(Stream, Encoding, bool)"/>)</param>
|
||||
public EncodedResource(IResource resource, bool autoDetectEncoding)
|
||||
:this(resource, null, autoDetectEncoding)
|
||||
{
|
||||
@@ -62,7 +62,7 @@ namespace Spring.Core.IO
|
||||
/// </summary>
|
||||
/// <param name="resource">the resource to read from. Must not be <c>null</c></param>
|
||||
/// <param name="encoding">the encoding to use. If <c>null</c>, encoding will be autodetected.</param>
|
||||
/// <param name="autoDetectEncoding">whether to autoDetect encoding from byte-order marks (<see cref="StreamReader(Stream, Encoding, bool)"/>)</param>
|
||||
/// <param name="autoDetectEncoding">whether to autoDetect encoding from byte-order marks (<see cref="M:StreamReader(Stream, Encoding, bool)"/>)</param>
|
||||
public EncodedResource(IResource resource, Encoding encoding, bool autoDetectEncoding)
|
||||
{
|
||||
AssertUtils.ArgumentNotNull(resource, "resource");
|
||||
@@ -88,7 +88,7 @@ namespace Spring.Core.IO
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// whether to autoDetect encoding from byte-order marks (<see cref="StreamReader(Stream, Encoding, bool)"/>)
|
||||
/// whether to autoDetect encoding from byte-order marks (<see cref="M:StreamReader(Stream, Encoding, bool)"/>)
|
||||
/// </summary>
|
||||
public bool AutoDetectEncoding
|
||||
{
|
||||
|
||||
@@ -342,10 +342,12 @@ namespace Spring.Data.NHibernate
|
||||
/// </exception>
|
||||
protected override bool IsExistingTransaction(object transaction)
|
||||
{
|
||||
return
|
||||
((HibernateTransactionObject)transaction).PromotableTxScopeTransactionObject.TxScopeAdapter.
|
||||
IsExistingTransaction;
|
||||
//return ((HibernateTransactionObject) transaction).HasTransaction();
|
||||
var hibernateTransactionObject = ((HibernateTransactionObject) transaction);
|
||||
|
||||
var hasExistingPromotableTxScopeTransaction = hibernateTransactionObject.PromotableTxScopeTransactionObject.TxScopeAdapter.IsExistingTransaction;
|
||||
var hasExistingTransaction = hibernateTransactionObject.HasTransaction();
|
||||
|
||||
return hasExistingPromotableTxScopeTransaction && hasExistingTransaction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -951,12 +953,14 @@ namespace Spring.Data.NHibernate
|
||||
}
|
||||
*/
|
||||
ISession session = txObject.SessionHolder.Session;
|
||||
|
||||
if (txObject.NewSessionHolder)
|
||||
{
|
||||
if (log.IsDebugEnabled)
|
||||
{
|
||||
log.Debug("Closing Hibernate Session [" + session + "] after transaction");
|
||||
}
|
||||
|
||||
SessionFactoryUtils.CloseSessionOrRegisterDeferredClose(session, SessionFactory);
|
||||
}
|
||||
else
|
||||
@@ -970,9 +974,8 @@ namespace Spring.Data.NHibernate
|
||||
session.FlushMode = txObject.SessionHolder.PreviousFlushMode;
|
||||
}
|
||||
}
|
||||
|
||||
txObject.SessionHolder.Clear();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private class HibernateTransactionObject : AdoTransactionObjectSupport
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="NHibernate" version="3.3.0" />
|
||||
<dependency id="Spring.Aop" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Data" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Aop" version="2.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
<dependency id="Spring.Data" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="NHibernate" version="4.0.0" />
|
||||
<dependency id="Spring.Aop" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Data" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Aop" version="2.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
<dependency id="Spring.Data" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="Spring.Aop" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Aop" version="2.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Spring.Transaction.Support
|
||||
//TODO Refactoring to sync with Spring 2.0 for nt/enums for various default values.
|
||||
|
||||
private TransactionPropagation _transactionPropagation = TransactionPropagation.Required;
|
||||
private IsolationLevel _transactionIsolationLevel = IsolationLevel.Unspecified;
|
||||
private IsolationLevel _transactionIsolationLevel = IsolationLevel.ReadCommitted;
|
||||
private int _timeout = DefaultTransactionDefinition.TIMEOUT_DEFAULT;
|
||||
private bool _readOnly = false;
|
||||
private string _name = null;
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace Spring.Messaging.Ems.Connections
|
||||
protected override void DoBegin(object transaction, ITransactionDefinition definition)
|
||||
{
|
||||
//This is the default value defined in DefaultTransactionDefinition
|
||||
if (definition.TransactionIsolationLevel != IsolationLevel.Unspecified)
|
||||
if (definition.TransactionIsolationLevel != IsolationLevel.ReadCommitted)
|
||||
{
|
||||
throw new InvalidIsolationLevelException("EMS does not support an isoliation level concept");
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Data" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
<dependency id="Spring.Data" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace Spring.Messaging.Nms.Connections
|
||||
protected override void DoBegin(object transaction, ITransactionDefinition definition)
|
||||
{
|
||||
//This is the default value defined in DefaultTransactionDefinition
|
||||
if (definition.TransactionIsolationLevel != IsolationLevel.Unspecified)
|
||||
if (definition.TransactionIsolationLevel != IsolationLevel.ReadCommitted)
|
||||
{
|
||||
throw new InvalidIsolationLevelException("NMS does not support an isoliation level concept");
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<dependencies>
|
||||
<dependency id="Apache.NMS" version="1.4.0" />
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Data" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
<dependency id="Spring.Data" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Data" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
<dependency id="Spring.Data" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="2.1.2" />
|
||||
<dependency id="Quartz" version="2.2.1" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Data" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
<dependency id="Spring.Data" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -116,11 +116,11 @@
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="NVelocity" version="1.0.3" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Data" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
<dependency id="Spring.Data" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="NUnit" version="2.5.7" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Data" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
<dependency id="Spring.Data" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="Spring.Data.NHibernate3" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Data.NHibernate3" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<summary>Interfaces and classes that provide ASP.NET AJAX 1.0 support in Spring.Net</summary>
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Web" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
<dependency id="Spring.Web" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Web" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
<dependency id="Spring.Web" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Web" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
<dependency id="Spring.Web" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Web" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
<dependency id="Spring.Web" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="Common.Logging" version="3.0.0" />
|
||||
<dependency id="Spring.Core" version="2.0.0-RC1" />
|
||||
<dependency id="Spring.Core" version="2.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyTitle("Spring.Data.NHibernate3 Integration Tests")]
|
||||
[assembly: AssemblyDescription("Integration tests for Spring.Data.NHibernate3 assembly")]
|
||||
[assembly: AssemblyTitle("Spring.Data.NHibernate4 Integration Tests")]
|
||||
[assembly: AssemblyDescription("Integration tests for Spring.Data.NHibernate4 assembly")]
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="spring">
|
||||
<section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
|
||||
<section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core"/>
|
||||
<section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core"/>
|
||||
</sectionGroup>
|
||||
<section name="connectionStringProperties" type="System.Configuration.NameValueSectionHandler"/>
|
||||
<section name="nHibernateConfigProperties" type="System.Configuration.NameValueSectionHandler"/>
|
||||
<section name="timeoutProperties" type="System.Configuration.NameValueSectionHandler" />
|
||||
</configSections>
|
||||
|
||||
|
||||
<spring>
|
||||
<context>
|
||||
<resource uri="config://spring/objects"/>
|
||||
<resource uri="assembly://Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Configuration.xml"/>
|
||||
<resource uri="assembly://Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.NHibernate.xml"/>
|
||||
</context>
|
||||
<parsers>
|
||||
<parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data"/>
|
||||
<parser type="Spring.Transaction.Config.TxNamespaceParser, Spring.Data"/>
|
||||
<parser type="Spring.Aop.Config.AopNamespaceParser, Spring.Aop"/>
|
||||
</parsers>
|
||||
<objects xmlns="http://www.springframework.net">
|
||||
<object type="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer, Spring.Core">
|
||||
<property name="Order" value="1"/>
|
||||
<property name="ConfigSections" value="connectionStringProperties,nHibernateConfigProperties,timeoutProperties" />
|
||||
</object>
|
||||
</objects>
|
||||
</spring>
|
||||
<appSettings>
|
||||
<remove key="saltKey"/>
|
||||
<add key="saltKey" value="" lockItem="true"/>
|
||||
</appSettings>
|
||||
|
||||
<connectionStringProperties>
|
||||
<add key="provider.active" value="SqlServer-4.0" />
|
||||
|
||||
<add key="conn.active" value="Data Source=SPRINGQA;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
|
||||
|
||||
</connectionStringProperties>
|
||||
<nHibernateConfigProperties>
|
||||
<add key="hibernate.default_schema" value="dbo" />
|
||||
<add key="hibernate.command_timeout" value="360" />
|
||||
</nHibernateConfigProperties>
|
||||
<timeoutProperties>
|
||||
<add key="timeout.sqlCommand.ado" value="150" />
|
||||
<add key="timeout.sqlCommand.nhibernate" value="150" />
|
||||
</timeoutProperties>
|
||||
|
||||
<system.web>
|
||||
|
||||
</system.web>
|
||||
|
||||
|
||||
<runtime>
|
||||
|
||||
</runtime>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests
|
||||
{
|
||||
public class Container : IContainer
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using NUnit.Framework;
|
||||
|
||||
using Spring.Testing.NUnit;
|
||||
|
||||
namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class HibernateTxScopeTransactionManagerNestedTransactionSuspensionTests : AbstractTransactionalSpringContextTests
|
||||
{
|
||||
#region DI
|
||||
|
||||
public IService1 Service1 { get; set; }
|
||||
public IService2 Service2 { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
protected override string[] ConfigLocations
|
||||
{
|
||||
get
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
"config://spring/objects",
|
||||
"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"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CanSuspendTransactionOnNotSupported()
|
||||
{
|
||||
Service1.ServiceMethodWithNotSupported1();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CanSuspendTransactionOnNotSupportedWithNestedRequiresNew()
|
||||
{
|
||||
Service2.ServiceMethodWithNotSupported();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CanSuspendTransactionOnNotSupportedWithNestedRequired()
|
||||
{
|
||||
Service1.ServiceMethodWithNotSupported3();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests
|
||||
{
|
||||
public interface IContainer
|
||||
{
|
||||
Guid Id { get; set; }
|
||||
string Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests
|
||||
{
|
||||
public interface IService1
|
||||
{
|
||||
void ServiceMethodWithNotSupported1();
|
||||
|
||||
void ServiceMethodWithNotSupported2();
|
||||
|
||||
void ServiceMethodWithNotSupported3();
|
||||
|
||||
void ServiceMethodWithNotSupported4();
|
||||
|
||||
void ServiceMethodWithRequired();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests
|
||||
{
|
||||
public interface IService2
|
||||
{
|
||||
void ServiceMethodWithNotSupported();
|
||||
|
||||
void ServiceMethodWithRequiresNew();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="true" assembly="Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests" namespace="Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests">
|
||||
|
||||
<class name="Container" proxy="IContainer">
|
||||
<id name="Id">
|
||||
<generator class="guid.comb" />
|
||||
</id>
|
||||
<property name="Name" />
|
||||
|
||||
</class>
|
||||
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyTitle("Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests")]
|
||||
[assembly: AssemblyDescription("Integration tests for HibernteTxScopeTransactionManager suspension of transactions")]
|
||||
@@ -0,0 +1,45 @@
|
||||
using Spring.Data.NHibernate.Generic;
|
||||
using Spring.Transaction;
|
||||
|
||||
namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.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 ServiceMethodWithNotSupported1()
|
||||
{
|
||||
ServiceMethodWithNotSupported2();
|
||||
}
|
||||
|
||||
[Transaction.Interceptor.Transaction(TransactionPropagation.NotSupported)]
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using Spring.Data.NHibernate.Generic;
|
||||
using Spring.Transaction;
|
||||
|
||||
namespace Spring.Data.NHibernate4.NestedTxSuspension.Integration.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 ServiceMethodWithNotSupported()
|
||||
{
|
||||
ServiceMethodWithRequiresNew();
|
||||
}
|
||||
|
||||
[Transaction.Interceptor.Transaction(TransactionPropagation.RequiresNew)]
|
||||
public virtual void ServiceMethodWithRequiresNew()
|
||||
{
|
||||
// do stuff
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net' xmlns:db="http://www.springframework.net/database" xmlns:tx="http://www.springframework.net/tx" xmlns:aop="http://www.springframework.net/aop">
|
||||
|
||||
<db:provider id="ActiveDbProvider" connectionString="${conn.active}" provider="${provider.active}" />
|
||||
|
||||
<object id="Spring.Data.NHibernate.Generic.HibernateTemplate" type="Spring.Data.NHibernate.Generic.HibernateTemplate, Spring.Data.NHibernate4">
|
||||
<property name="SessionFactory" ref="Spring.Data.NHibernate.LocalSessionFactoryObject" />
|
||||
<property name="TemplateFlushMode" value="Auto" />
|
||||
<property name="CacheQueries" value="true" />
|
||||
</object>
|
||||
|
||||
<tx:advice id="transactionAdvice" transaction-manager="Spring.Transaction.IPlatformTransactionManager" />
|
||||
|
||||
<object type="Spring.Aop.Framework.AutoProxy.InheritanceBasedAopConfigurer, Spring.Aop">
|
||||
<property name="Order" value="2" />
|
||||
<property name="ProxyDeclaredMembersOnly" value="false" />
|
||||
<property name="ObjectNames">
|
||||
<list>
|
||||
<value>*Service*</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="InterceptorNames">
|
||||
<list>
|
||||
<value>transactionAdvice</value>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<object id="IService1" type="Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests.Service1, Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests">
|
||||
<property name="HibernateTemplate" ref="Spring.Data.NHibernate.Generic.HibernateTemplate" />
|
||||
</object>
|
||||
|
||||
<object id="IService2" type="Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests.Service2, Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests">
|
||||
<property name="HibernateTemplate" ref="Spring.Data.NHibernate.Generic.HibernateTemplate" />
|
||||
</object>
|
||||
</objects>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
|
||||
<!--
|
||||
Required properties:
|
||||
* current.bin.dir - (path) root level to build to
|
||||
* current.build.debug - (true|false) debug build?
|
||||
* current.build.defines.csc - framework-specific build defines for C# compiler
|
||||
-->
|
||||
|
||||
<include buildfile="${spring.basedir}/common-project.include" />
|
||||
|
||||
<target name="build">
|
||||
|
||||
<!-- build Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
nostdlib="true"
|
||||
noconfig="true"
|
||||
>
|
||||
<nowarn>
|
||||
<warning number="${nowarn.numbers.test}" />
|
||||
</nowarn>
|
||||
<sources failonempty="true">
|
||||
<include name="**/*.cs" />
|
||||
<include name="../CommonAssemblyInfo.cs" />
|
||||
</sources>
|
||||
<references>
|
||||
<lib>
|
||||
<include name="${nh4.lib.dir}"/>
|
||||
<include name="${iesi4.lib.dir}"/>
|
||||
</lib>
|
||||
<include name="mscorlib.dll"/>
|
||||
<include name="Microsoft.CSharp.dll"/>
|
||||
<include name="System.dll"/>
|
||||
<include name="System.Core.dll"/>
|
||||
<include name="System.Data.dll" />
|
||||
<include name="System.EnterpriseServices.dll" />
|
||||
<include name="${current.bin.dir}/*.dll" />
|
||||
<exclude name="${current.bin.dir}/${project::get-name()}.dll" />
|
||||
<exclude name="${current.bin.dir}/Spring.Data.NHibernate3*.dll" />
|
||||
<exclude name="${current.bin.dir}/Spring.Data.NHibernate*Tests*.dll" />
|
||||
<exclude name="${current.bin.dir}/CloverRuntime.dll" />
|
||||
</references>
|
||||
<resources prefix="Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests" dynamicprefix="true" failonempty="true">
|
||||
<include name="**/*.xml" />
|
||||
</resources>
|
||||
</csc>
|
||||
|
||||
<!--<copy file="${project::get-base-directory()}/${project::get-name()}.dll.config"
|
||||
tofile="${current.bin.dir}/${project::get-name()}.dll.config"/> -->
|
||||
|
||||
<copy file="${project::get-base-directory()}/app.config"
|
||||
tofile="${current.bin.dir}/${project::get-name()}.dll.config"/>
|
||||
|
||||
|
||||
</target>
|
||||
|
||||
<target name="test" depends="build">
|
||||
<!-- property name="test.assemblyname" value="${project::get-name()}" / -->
|
||||
<call target="common.run-tests" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{DE276F7C-4564-49EC-AABC-B964EC3D1626}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests</RootNamespace>
|
||||
<AssemblyName>Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2010\Spring.Data.NestedTxSuspension.Integration.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_4_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2010\Spring.Data.NestedTxSuspension.Integration.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_4_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Common.Logging, Version=3.0.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Common.Logging.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate">
|
||||
<HintPath>..\..\..\packages\NHibernate.4.0.3.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Container.cs" />
|
||||
<Compile Include="IContainer.cs" />
|
||||
<Compile Include="IService1.cs" />
|
||||
<Compile Include="IService2.cs" />
|
||||
<Compile Include="HibernateTxScopeTransactionManagerNestedTransactionSuspensionTests.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Service1.cs" />
|
||||
<Compile Include="Service2.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2010.csproj">
|
||||
<Project>{3a3a4e65-45a6-4b20-b460-0bedc302c02c}</Project>
|
||||
<Name>Spring.Aop.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2010.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data.NHibernate4\Spring.Data.NHibernate4.2010.csproj">
|
||||
<Project>{d9c45177-0d80-4133-ab46-58f142db92aa}</Project>
|
||||
<Name>Spring.Data.NHibernate4.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2010.csproj">
|
||||
<Project>{ae00e5ab-c39a-436f-86d2-33bfe33e2e40}</Project>
|
||||
<Name>Spring.Data.2010</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Testing.NUnit\Spring.Testing.NUnit.2010.csproj">
|
||||
<Project>{ed204a7b-832f-44c7-bfe3-504aebe1bcc8}</Project>
|
||||
<Name>Spring.Testing.NUnit.2010</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Mappings.hbm.xml" />
|
||||
<EmbeddedResource Include="Spring.Configuration.xml" />
|
||||
<EmbeddedResource Include="Spring.NHibernate.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Spring.HibernateTxScopeTransactionManager.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns='http://www.springframework.net' xmlns:db="http://www.springframework.net/database" xmlns:tx="http://www.springframework.net/tx" xmlns:aop="http://www.springframework.net/aop">
|
||||
|
||||
|
||||
<object id="Spring.Transaction.IPlatformTransactionManager" type="Spring.Data.NHibernate.HibernateTxScopeTransactionManager, Spring.Data.NHibernate4">
|
||||
<property name="DbProvider" ref="ActiveDbProvider"/>
|
||||
<property name="SessionFactory" ref="Spring.Data.NHibernate.LocalSessionFactoryObject"/>
|
||||
</object>
|
||||
|
||||
|
||||
</objects>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net" xmlns:db="http://www.springframework.net/database">
|
||||
<description>Dependency Injection for NHibernate Session</description>
|
||||
|
||||
<object id="Spring.Data.NHibernate.LocalSessionFactoryObject" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate4">
|
||||
<property name="DbProvider" ref="ActiveDbProvider"/>
|
||||
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
<entry key="dialect" value="NHibernate.Dialect.MsSql2008Dialect" />
|
||||
<entry key="connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
|
||||
<entry key="connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
|
||||
<entry key="connection.isolation" value="ReadCommitted" />
|
||||
<entry key="adonet.batch_size" value="10" />
|
||||
<entry key="show_sql" value="false" />
|
||||
<entry key="prepare_sql" value="true" />
|
||||
<entry key="command_timeout" value="360" />
|
||||
<entry key="max_fetch_depth" value="3" />
|
||||
<entry key="default_schema" value="dbo" />
|
||||
<entry key="bytecode.provider" value="lcg" />
|
||||
<entry key="proxyfactory.factory_class" value="NHibernate.Bytecode.DefaultProxyFactoryFactory, NHibernate"/>
|
||||
<entry key="transaction.factory_class" value="NHibernate.Transaction.AdoNetTransactionFactory, NHibernate"/>
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
<property name="ExposeTransactionAwareSessionFactory" value="true" />
|
||||
|
||||
<property name="MappingResources">
|
||||
<list>
|
||||
<value>assembly://Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Spring.Data.NHibernate4.NestedTxSuspension.Integration.Tests/Mappings.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="NHibernate.Cfg.Configuration" type="Spring.Objects.Factory.Config.PropertyRetrievingFactoryObject, Spring.Core">
|
||||
<property name="TargetObject" ref="&Spring.Data.NHibernate.LocalSessionFactoryObject"/>
|
||||
<property name="TargetProperty" value="Configuration"/>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -45,7 +45,7 @@ namespace Spring.Data
|
||||
public class AdoPlatformTransactionManagerTests
|
||||
{
|
||||
private MockRepository mocks;
|
||||
private IsolationLevel _defaultIsolationLevel = IsolationLevel.Unspecified;
|
||||
private const IsolationLevel DefaultIsolationLevel = IsolationLevel.ReadCommitted;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
@@ -75,7 +75,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
//standard tx timeout.
|
||||
transaction.Commit();
|
||||
LastCall.On(transaction).Repeat.Once();
|
||||
@@ -116,7 +116,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
//standard tx timeout.
|
||||
transaction.Rollback();
|
||||
LastCall.On(transaction).Repeat.Once();
|
||||
@@ -166,7 +166,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
//standard tx timeout.
|
||||
transaction.Rollback();
|
||||
LastCall.On(transaction).Repeat.Once();
|
||||
@@ -238,7 +238,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection).Repeat.Twice();
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Twice();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction).Repeat.Twice();
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction).Repeat.Twice();
|
||||
//standard tx timeout.
|
||||
transaction.Rollback();
|
||||
LastCall.On(transaction).Repeat.Once();
|
||||
@@ -280,7 +280,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
transaction.Commit();
|
||||
LastCall.On(transaction).Repeat.Once();
|
||||
connection.Dispose();
|
||||
@@ -292,7 +292,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider2.CreateConnection()).Return(connection2);
|
||||
connection2.Open();
|
||||
LastCall.On(connection2).Repeat.Once();
|
||||
Expect.Call(connection2.BeginTransaction(_defaultIsolationLevel)).Return(transaction2);
|
||||
Expect.Call(connection2.BeginTransaction(DefaultIsolationLevel)).Return(transaction2);
|
||||
transaction2.Rollback();
|
||||
LastCall.On(transaction2).Repeat.Once();
|
||||
connection2.Dispose();
|
||||
@@ -335,7 +335,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
transaction.Rollback();
|
||||
LastCall.On(transaction).Repeat.Once();
|
||||
connection.Dispose();
|
||||
@@ -395,7 +395,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
//standard tx timeout.
|
||||
transaction.Commit();
|
||||
LastCall.On(transaction).Repeat.Once();
|
||||
@@ -431,7 +431,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
//standard tx timeout.
|
||||
transaction.Rollback();
|
||||
LastCall.On(transaction).Repeat.Once();
|
||||
@@ -482,7 +482,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection2);
|
||||
connection2.Open();
|
||||
LastCall.On(connection2).Repeat.Once();
|
||||
Expect.Call(connection2.BeginTransaction(_defaultIsolationLevel)).Return(transaction2);
|
||||
Expect.Call(connection2.BeginTransaction(DefaultIsolationLevel)).Return(transaction2);
|
||||
transaction2.Commit();
|
||||
LastCall.On(transaction2).Repeat.Once();
|
||||
connection2.Dispose();
|
||||
@@ -573,7 +573,7 @@ namespace Spring.Data
|
||||
connection.Open();
|
||||
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.CreateCommand()).Return(command);
|
||||
command.CommandText = "some SQL statement";
|
||||
LastCall.On(command).Repeat.Once();
|
||||
@@ -674,7 +674,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
//standard tx timeout.
|
||||
transaction.Commit();
|
||||
LastCall.On(transaction).Throw(new TestSqlException("Cannot commit", "314"));
|
||||
@@ -717,7 +717,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
transaction.Commit();
|
||||
LastCall.On(transaction).Throw(new TestSqlException("Cannot commit", "314"));
|
||||
|
||||
@@ -763,7 +763,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
//standard tx timeout.
|
||||
transaction.Rollback();
|
||||
LastCall.On(transaction).Throw(new TestSqlException("Cannot commit", "314"));
|
||||
@@ -877,7 +877,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
|
||||
transaction.Rollback();
|
||||
LastCall.On(transaction).Repeat.Once();
|
||||
@@ -923,7 +923,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
//standard tx timeout.
|
||||
transaction.Commit();
|
||||
LastCall.On(transaction).Repeat.Once();
|
||||
@@ -971,7 +971,7 @@ namespace Spring.Data
|
||||
Expect.Call(dbProvider.CreateConnection()).Return(connection);
|
||||
connection.Open();
|
||||
LastCall.On(connection).Repeat.Once();
|
||||
Expect.Call(connection.BeginTransaction(_defaultIsolationLevel)).Return(transaction);
|
||||
Expect.Call(connection.BeginTransaction(DefaultIsolationLevel)).Return(transaction);
|
||||
transaction.Rollback();
|
||||
LastCall.On(transaction).Repeat.Once();
|
||||
connection.Dispose();
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace Spring.Data.Core
|
||||
// inner tx
|
||||
ConfigureServiceConfig(serviceConfig, false);
|
||||
serviceConfig.TransactionOption = TransactionOption.RequiresNew;
|
||||
serviceConfig.IsolationLevel = TransactionIsolationLevel.Any;
|
||||
serviceConfig.IsolationLevel = TransactionIsolationLevel.ReadCommitted;
|
||||
txAdapter.Enter(serviceConfig);
|
||||
Expect.Call(txAdapter.IsInTransaction).Return(true);
|
||||
txAdapter.SetAbort();
|
||||
@@ -204,7 +204,7 @@ namespace Spring.Data.Core
|
||||
if (standardIsolationAndProp)
|
||||
{
|
||||
serviceConfig.TransactionOption = TransactionOption.Required;
|
||||
serviceConfig.IsolationLevel = TransactionIsolationLevel.Any;
|
||||
serviceConfig.IsolationLevel = TransactionIsolationLevel.ReadCommitted;
|
||||
}
|
||||
return serviceConfig;
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Spring.Data.Core
|
||||
{
|
||||
Expect.Call(txAdapter.IsExistingTransaction).Return(false);
|
||||
TransactionOptions txOptions = new TransactionOptions();
|
||||
txOptions.IsolationLevel = IsolationLevel.Unspecified;
|
||||
txOptions.IsolationLevel = IsolationLevel.ReadCommitted;
|
||||
txAdapter.CreateTransactionScope(TransactionScopeOption.Required, txOptions, EnterpriseServicesInteropOption.None);
|
||||
|
||||
Expect.Call(txAdapter.RollbackOnly).Return(false);
|
||||
@@ -94,7 +94,7 @@ namespace Spring.Data.Core
|
||||
{
|
||||
Expect.Call(txAdapter.IsExistingTransaction).Return(false);
|
||||
TransactionOptions txOptions = new TransactionOptions();
|
||||
txOptions.IsolationLevel = IsolationLevel.Unspecified;
|
||||
txOptions.IsolationLevel = IsolationLevel.ReadCommitted;
|
||||
txAdapter.CreateTransactionScope(TransactionScopeOption.Required, txOptions, EnterpriseServicesInteropOption.None);
|
||||
txAdapter.Dispose();
|
||||
}
|
||||
@@ -141,7 +141,7 @@ namespace Spring.Data.Core
|
||||
{
|
||||
Expect.Call(txAdapter.IsExistingTransaction).Return(false);
|
||||
TransactionOptions txOptions = new TransactionOptions();
|
||||
txOptions.IsolationLevel = IsolationLevel.Unspecified;
|
||||
txOptions.IsolationLevel = IsolationLevel.ReadCommitted;
|
||||
txAdapter.CreateTransactionScope(TransactionScopeOption.RequiresNew, txOptions, EnterpriseServicesInteropOption.None);
|
||||
|
||||
//inner tx actions
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Spring.Transaction.Interceptor
|
||||
public void ToStringTests()
|
||||
{
|
||||
DefaultTransactionAttribute dta = new DefaultTransactionAttribute();
|
||||
Assert.AreEqual( "PROPAGATION_Required,ISOLATION_Unspecified,-System.Exception", dta.ToString());
|
||||
Assert.AreEqual( "PROPAGATION_Required,ISOLATION_ReadCommitted,-System.Exception", dta.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Spring.Transaction.Interceptor
|
||||
ITransactionAttribute ta = editor.Value;
|
||||
Assert.IsTrue( ta != null );
|
||||
Assert.IsTrue( ta.PropagationBehavior == TransactionPropagation.Required );
|
||||
Assert.IsTrue( ta.TransactionIsolationLevel == IsolationLevel.Unspecified );
|
||||
Assert.IsTrue( ta.TransactionIsolationLevel == IsolationLevel.ReadCommitted );
|
||||
Assert.IsFalse( ta.ReadOnly );
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Spring.Transaction.Interceptor
|
||||
{
|
||||
ITransactionAttribute ta = tas.ReturnTransactionAttribute( method, null );
|
||||
Assert.IsTrue( ta != null );
|
||||
Assert.IsTrue( ta.TransactionIsolationLevel == IsolationLevel.Unspecified );
|
||||
Assert.IsTrue( ta.TransactionIsolationLevel == IsolationLevel.ReadCommitted );
|
||||
Assert.IsTrue( ta.PropagationBehavior == transactionPropagation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Spring.Transaction.Support
|
||||
Assert.IsTrue( 1000 == def.TransactionTimeout );
|
||||
Assert.IsTrue( false == def.ReadOnly );
|
||||
def.ReadOnly = true;
|
||||
Assert.IsTrue( true == def.ReadOnly );
|
||||
Assert.IsTrue( def.ReadOnly );
|
||||
}
|
||||
[Test]
|
||||
public void PropogationBehaviorDefault()
|
||||
@@ -32,7 +32,7 @@ namespace Spring.Transaction.Support
|
||||
public void IsolationLevelDefault()
|
||||
{
|
||||
DefaultTransactionDefinition def = new DefaultTransactionDefinition();
|
||||
Assert.IsTrue(def.TransactionIsolationLevel == IsolationLevel.Unspecified);
|
||||
Assert.IsTrue(def.TransactionIsolationLevel == IsolationLevel.ReadCommitted);
|
||||
}
|
||||
[Test]
|
||||
[ExpectedException(typeof(ArgumentException))]
|
||||
|
||||
@@ -112,11 +112,11 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="Spring.Template.Velocity.Tests" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
|
||||
|
||||
<include buildfile="${spring.basedir}/common-project.include" />
|
||||
|
||||
<!--
|
||||
Required properties:
|
||||
* current.bin.dir - (path) root level to build to
|
||||
* build.debug - (true|false) debug build?
|
||||
* current.build.defines.csc - framework-specific build defines
|
||||
-->
|
||||
<target name="build">
|
||||
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
nostdlib="true"
|
||||
noconfig="true"
|
||||
>
|
||||
<nowarn>
|
||||
<warning number="${nowarn.numbers.test}" />
|
||||
</nowarn>
|
||||
<sources failonempty="true">
|
||||
<include name="**/*.cs" />
|
||||
<include name="../CommonAssemblyInfo.cs" />
|
||||
</sources>
|
||||
<references>
|
||||
<include name="mscorlib.dll"/>
|
||||
<include name="Microsoft.CSharp.dll"/>
|
||||
<include name="System.dll"/>
|
||||
<include name="System.Configuration.dll"/>
|
||||
<include name="System.Core.dll"/>
|
||||
<include name="${current.bin.dir}/*.dll" />
|
||||
<exclude name="${current.bin.dir}/${project::get-name()}.dll" />
|
||||
</references>
|
||||
<resources prefix="Spring" dynamicprefix="true" failonempty="true">
|
||||
<include name="**/*.xml" />
|
||||
<include name="**/*.xsd" />
|
||||
<include name="**/*.test" />
|
||||
<include name="**/*.vm" />
|
||||
<include name="**/*.properties" />
|
||||
<include name="**/*.config" />
|
||||
</resources>
|
||||
</csc>
|
||||
<copy todir="${current.bin.dir}" failonerror="true">
|
||||
<fileset basedir="${project::get-base-directory()}">
|
||||
<include name="**/*.xml" />
|
||||
<include name="**/*.xsd" />
|
||||
<include name="**/*.test" />
|
||||
<include name="**/*.vm" />
|
||||
<include name="**/*.properties" />
|
||||
<include name="**/*.config" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="test" depends="build">
|
||||
<!-- property name="test.assemblyname" value="${project::get-name()}" / -->
|
||||
<call target="common.run-tests" />
|
||||
</target>
|
||||
<!--
|
||||
<target name="test" depends="build">
|
||||
<nunit2>
|
||||
<formatter type="Plain" />
|
||||
<formatter type="Xml" usefile="true" extension=".xml"
|
||||
outputdir="${current.bin.dir}/results" />
|
||||
<test assemblyname="${current.bin.dir}/${project::get-name()}.dll"
|
||||
appconfig="${current.bin.dir}/${project::get-name()}.dll.config" />
|
||||
</nunit2>
|
||||
</target>
|
||||
|
||||
<target name="test-mono-1.0" >
|
||||
<nunit2>
|
||||
<formatter type="Plain" />
|
||||
<formatter type="Xml" usefile="true" extension=".xml"
|
||||
outputdir="${current.bin.dir}/results" />
|
||||
<test assemblyname="${bin.dir}/net/1.1/${current.build.config}/${project::get-name()}.dll"
|
||||
appconfig="${bin.dir}/net/1.1/${current.build.config}/${project::get-name()}.dll.config" />
|
||||
</nunit2>
|
||||
</target>
|
||||
-->
|
||||
</project>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{8D6ED392-8A1F-41C0-A765-22CF384EDEA1}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Template.Velocity.Castle.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkSubset>
|
||||
</TargetFrameworkSubset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.NET.2008\Spring.Template.Velocity.Castle.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.NET.2008\Spring.Template.Velocity.Castle.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="nunit.framework, Version=2.4.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NVelocity, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\NVelocity.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Template\Velocity\Config\TemplateNamespaceParserTests.cs" />
|
||||
<Compile Include="Template\Velocity\VelocityEngineFactoryObjectTests.cs" />
|
||||
<Compile Include="Template\Velocity\VelocityEngineTestBase.cs" />
|
||||
<Compile Include="VelocityCompilerOptionsTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2008.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Template.Velocity\Spring.Template.Velocity.2008.csproj">
|
||||
<Project>{BF3AB954-8375-407C-9E98-4C51D8072784}</Project>
|
||||
<Name>Spring.Template.Velocity.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Core.Tests\Spring.Core.Tests.2008.csproj">
|
||||
<Project>{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}</Project>
|
||||
<Name>Spring.Core.Tests.2008</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Template\Velocity\VelocityEngineFactoryObjectTests.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Template\Velocity\SimpleTemplate.vm">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Template\Velocity\config.properties">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<EmbeddedResource Include="Template\Velocity\EmbeddedTemplate.vm">
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
Reference in New Issue
Block a user