diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/Spring.Northwind.2008.sln b/examples/Spring/Spring.Data.NHibernate.Northwind/Spring.Northwind.2008.sln index 915e18bb..c9b7f879 100644 --- a/examples/Spring/Spring.Data.NHibernate.Northwind/Spring.Northwind.2008.sln +++ b/examples/Spring/Spring.Data.NHibernate.Northwind/Spring.Northwind.2008.sln @@ -4,7 +4,7 @@ Microsoft Visual Studio Solution File, Format Version 10.00 Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Spring.Northwind.Web", "src\Spring.Northwind.Web\", "{3E321CBC-75B0-45C4-AFEF-7CEED28368AE}" ProjectSection(WebsiteProperties) = preProject TargetFramework = "3.5" - ProjectReferences = "{53B04C54-63EA-45AA-BB83-8950AF3C5D68}|Spring.Aspects.dll;{7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}|Spring.Northwind.Dao.dll;{6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}|Spring.Northwind.Dao.NHibernate.dll;{9E15876F-E9E0-43B7-9874-B54F163757D6}|Spring.Northwind.Service.dll;{FD89FEBE-4914-45F3-9123-B2CB954810DD}|Spring.Northwind.Web.References.dll;" + ProjectReferences = "{7F45EEA2-50AC-44E2-85A6-2FFB02E38C44}|Spring.Northwind.Dao.dll;{6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4}|Spring.Northwind.Dao.NHibernate.dll;{9E15876F-E9E0-43B7-9874-B54F163757D6}|Spring.Northwind.Service.dll;{FD89FEBE-4914-45F3-9123-B2CB954810DD}|Spring.Northwind.Web.References.dll;" Debug.AspNetCompiler.VirtualPath = "/Spring.Northwind.Web" Debug.AspNetCompiler.PhysicalPath = "src\Spring.Northwind.Web\" Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Spring.Northwind.Web\" @@ -19,7 +19,7 @@ Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Spring.Northwind.Web", "src Release.AspNetCompiler.ForceOverwrite = "true" Release.AspNetCompiler.FixedNames = "false" Release.AspNetCompiler.Debug = "False" - VWDPort = "17866" + VWDPort = "1135" DefaultWebSiteLanguage = "Visual C#" EndProjectSection EndProject @@ -31,8 +31,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Northwind.Dao.NHiber EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Northwind.IntegrationTests.2008", "test\Spring.Northwind.IntegrationTests\Spring.Northwind.IntegrationTests.2008.csproj", "{2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Aspects.2008", "src\Spring.Aspects\Spring.Aspects.2008.csproj", "{53B04C54-63EA-45AA-BB83-8950AF3C5D68}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Northwind.Web.References.2008", "src\Spring.Northwind.Web.References\Spring.Northwind.Web.References.2008.csproj", "{FD89FEBE-4914-45F3-9123-B2CB954810DD}" EndProject Global @@ -95,16 +93,6 @@ Global {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Any CPU.Build.0 = Release|Any CPU {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|.NET.ActiveCfg = Debug|Any CPU - {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Any CPU.Build.0 = Debug|Any CPU - {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|.NET.ActiveCfg = Release|Any CPU - {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Any CPU.ActiveCfg = Release|Any CPU - {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Any CPU.Build.0 = Release|Any CPU - {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {53B04C54-63EA-45AA-BB83-8950AF3C5D68}.Release|Mixed Platforms.Build.0 = Release|Any CPU {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Debug|.NET.ActiveCfg = Debug|Any CPU {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FD89FEBE-4914-45F3-9123-B2CB954810DD}.Debug|Any CPU.Build.0 = Debug|Any CPU diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Aspects/Logging/CommonLoggingAroundAdvice.cs b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Aspects/Logging/CommonLoggingAroundAdvice.cs deleted file mode 100644 index d0e149d5..00000000 --- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Aspects/Logging/CommonLoggingAroundAdvice.cs +++ /dev/null @@ -1,103 +0,0 @@ -#region License - -/* - * Copyright © 2002-2006 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -#region Imports - -using System; - -using AopAlliance.Intercept; -using Common.Logging; - -#endregion - -namespace Spring.Aspects.Logging -{ - /// - /// Basic implementation of a logging aspect using Common.Logging library. - /// - /// Bruno Baia - /// $Id: CommonLoggingAroundAdvice.cs,v 1.2 2007/06/27 16:10:59 bbaia Exp $ - public class CommonLoggingAroundAdvice : IMethodInterceptor - { - #region Logging - - private static readonly ILog LOG = LogManager.GetLogger(typeof(CommonLoggingAroundAdvice)); - - #endregion - - #region Fields - - private LogLevel _level = LogLevel.All; - - #endregion - - #region Properties - - public LogLevel Level - { - get { return _level; } - set { _level = value; } - } - - #endregion - - #region IMethodInterceptor Members - - public object Invoke(IMethodInvocation invocation) - { - Log("Intercepted call : about to invoke method '{0}'", invocation.Method.Name); - object returnValue = invocation.Proceed(); - Log("Intercepted call : returned '{0}'", returnValue); - return returnValue; - } - - #endregion - - #region Private Methods - - private void Log(string text, params object[] args) - { - switch (Level) - { - case LogLevel.All: - case LogLevel.Debug: - if (LOG.IsDebugEnabled) LOG.Debug(String.Format(text, args)); - break; - case LogLevel.Error: - if (LOG.IsErrorEnabled) LOG.Error(String.Format(text, args)); - break; - case LogLevel.Fatal: - if (LOG.IsFatalEnabled) LOG.Fatal(String.Format(text, args)); - break; - case LogLevel.Info: - if (LOG.IsInfoEnabled) LOG.Info(String.Format(text, args)); - break; - case LogLevel.Warn: - if (LOG.IsWarnEnabled) LOG.Warn(String.Format(text, args)); - break; - case LogLevel.Off: - default: - break; - } - } - - #endregion - } -} \ No newline at end of file diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Properties/AssemblyInfo.cs b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Properties/AssemblyInfo.cs deleted file mode 100644 index 993267c9..00000000 --- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -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.Aspects")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Spring.Aspects")] -[assembly: AssemblyCopyright("Copyright © 2006")] -[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("a308abe4-e623-4315-aa51-13b52a9324d8")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Spring.Aspects.2008.csproj b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Spring.Aspects.2008.csproj deleted file mode 100644 index d8ab2c5a..00000000 --- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Spring.Aspects.2008.csproj +++ /dev/null @@ -1,60 +0,0 @@ - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {53B04C54-63EA-45AA-BB83-8950AF3C5D68} - Library - Properties - Spring - Spring.Aspects - - - 2.0 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\..\lib\Net\2.0\Common.Logging.dll - - - False - ..\..\..\..\..\bin\net\2.0\debug\Spring.Aop.dll - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Spring.Aspects.csproj b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Spring.Aspects.csproj deleted file mode 100644 index dd224740..00000000 --- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Aspects/Spring.Aspects.csproj +++ /dev/null @@ -1,55 +0,0 @@ - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {53B04C54-63EA-45AA-BB83-8950AF3C5D68} - Library - Properties - Spring - Spring.Aspects - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\..\lib\Net\2.0\Common.Logging.dll - - - False - ..\..\..\..\..\bin\net\2.0\debug\Spring.Aop.dll - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Dao.NHibernate/Dao/NHibernate/HibernateCustomerDao.cs b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Dao.NHibernate/Dao/NHibernate/HibernateCustomerDao.cs index 496cefb0..9e786c46 100644 --- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Dao.NHibernate/Dao/NHibernate/HibernateCustomerDao.cs +++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Dao.NHibernate/Dao/NHibernate/HibernateCustomerDao.cs @@ -33,17 +33,6 @@ namespace Spring.Northwind.Dao.NHibernate [Repository] public class HibernateCustomerDao : HibernateDao, ICustomerDao { - [Transaction(ReadOnly = true)] - public Customer Get(string customerId) - { - return Session.Get(customerId); - } - - [Transaction(ReadOnly = true)] - public IList GetAll() - { - return GetAll(); - } // Note that the transaction demaraction is here only for the case when // the DAO object is being used directly, i.e. not as part of a service layer @@ -57,6 +46,19 @@ namespace Spring.Northwind.Dao.NHibernate // propagation setting set to REQUIRED, then any DAO operations will use the // same settings as started from the transactional layer. + [Transaction(ReadOnly = true)] + public Customer Get(string customerId) + { + return Session.Get(customerId); + } + + [Transaction(ReadOnly = true)] + public IList GetAll() + { + return GetAll(); + } + + [Transaction(ReadOnly = false)] public string Save(Customer customer) { diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Config/Aspects.xml b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Config/Aspects.xml index b50ad156..7033cf20 100644 --- a/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Config/Aspects.xml +++ b/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Config/Aspects.xml @@ -2,8 +2,18 @@ - - + + + + + + + + + + + + diff --git a/examples/Spring/Spring.Data.NHibernate.Northwind/test/Spring.Northwind.IntegrationTests/Spring.Northwind.IntegrationTests.2008.csproj b/examples/Spring/Spring.Data.NHibernate.Northwind/test/Spring.Northwind.IntegrationTests/Spring.Northwind.IntegrationTests.2008.csproj index 9b381d49..e381ce3a 100644 --- a/examples/Spring/Spring.Data.NHibernate.Northwind/test/Spring.Northwind.IntegrationTests/Spring.Northwind.IntegrationTests.2008.csproj +++ b/examples/Spring/Spring.Data.NHibernate.Northwind/test/Spring.Northwind.IntegrationTests/Spring.Northwind.IntegrationTests.2008.csproj @@ -2,7 +2,7 @@ Debug AnyCPU - 8.0.50727 + 9.0.21022 2.0 {2D0C5DF7-3BDB-44FB-BC1B-58E60B170BAD} Library @@ -91,10 +91,6 @@ - - {53B04C54-63EA-45AA-BB83-8950AF3C5D68} - Spring.Aspects - {6E4F55A0-C281-4706-A08B-BDEC2D2FBDA4} Spring.Northwind.Dao.NHibernate