springnet-commits Mailing List for Spring Framework .NET (Page 34)
Brought to you by:
aseovic,
markpollack
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(33) |
Aug
(163) |
Sep
(491) |
Oct
(289) |
Nov
(336) |
Dec
(84) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(227) |
Feb
(413) |
Mar
(128) |
Apr
(232) |
May
(92) |
Jun
(299) |
Jul
(386) |
Aug
(228) |
Sep
(237) |
Oct
(426) |
Nov
(325) |
Dec
(405) |
2006 |
Jan
(315) |
Feb
(311) |
Mar
(152) |
Apr
(177) |
May
(443) |
Jun
(92) |
Jul
(88) |
Aug
(80) |
Sep
(288) |
Oct
(515) |
Nov
(1049) |
Dec
(440) |
2007 |
Jan
(179) |
Feb
(406) |
Mar
(294) |
Apr
(80) |
May
(432) |
Jun
(242) |
Jul
(452) |
Aug
(710) |
Sep
(206) |
Oct
(240) |
Nov
(65) |
Dec
(227) |
2008 |
Jan
(80) |
Feb
(90) |
Mar
(98) |
Apr
(136) |
May
(101) |
Jun
(12) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mark P. <mar...@us...> - 2007-10-17 07:11:41
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/test/Spring/Spring.TxQuickStart.Tests/TxQuickStart In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22861 Added Files: CreditsDebitsSchema.sql Log Message: add schema for tx example... --- NEW FILE: CreditsDebitsSchema.sql --- USE [CreditsAndDebits] CREATE TABLE [Credits]( [CreditID] [int] IDENTITY NOT NULL, [CreditAmount] [float] NOT NULL, CONSTRAINT [PK_CreditID] PRIMARY KEY CLUSTERED ( [CreditID] ASC ) ON [PRIMARY] ) ON [PRIMARY] GO USE [CreditsAndDebits] GO CREATE TABLE [Debits]( [DebitID] [int] IDENTITY NOT NULL, [DebitAmount] [float] NOT NULL, CONSTRAINT [PK_DebitID] PRIMARY KEY CLUSTERED ( [DebitID] ASC ) ON [PRIMARY] ) ON [PRIMARY] GO USE [Credits] GO CREATE TABLE [Credits]( [CreditID] [int] IDENTITY NOT NULL, [CreditAmount] [float] NOT NULL, CONSTRAINT [PK_CreditID] PRIMARY KEY CLUSTERED ( [CreditID] ASC ) ON [PRIMARY] ) ON [PRIMARY] GO USE [Debits] GO CREATE TABLE [Debits]( [DebitID] [int] IDENTITY NOT NULL, [DebitAmount] [float] NOT NULL, CONSTRAINT [PK_DebitID] PRIMARY KEY CLUSTERED ( [DebitID] ASC ) ON [PRIMARY] ) ON [PRIMARY] GO |
From: Mark P. <mar...@us...> - 2007-10-16 16:22:22
|
Update of /cvsroot/springnet/Spring.Net In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24856 Modified Files: changelog.txt Log Message: add note about 're-release' of 1.1 rc2 to fix critical dbprovider.xml bug. Index: changelog.txt =================================================================== RCS file: /cvsroot/springnet/Spring.Net/changelog.txt,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** changelog.txt 11 Oct 2007 16:05:49 -0000 1.27 --- changelog.txt 16 Oct 2007 16:22:18 -0000 1.28 *************** *** 5,8 **** --- 5,10 ---- Release 1.1 RC2, October 15, 2007 + (Note: A bug in the dbproviders.xml file was discovered shortly after the initial release of 1.1 RC2. A new version was uploaded with the same name. This should not present a problem, but if you have trouble creating an OracleODP-2.0 provider, please download again) + Bug |
From: Mark P. <mar...@us...> - 2007-10-16 16:13:10
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Common In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv20977 Modified Files: DbProviderFactoryTests.cs Log Message: add test for oracle provider, but ignore until finding out if one can add oracle .dlls to cvs repo... Index: DbProviderFactoryTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Common/DbProviderFactoryTests.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DbProviderFactoryTests.cs 11 Oct 2007 16:22:08 -0000 1.8 --- DbProviderFactoryTests.cs 16 Oct 2007 16:13:04 -0000 1.9 *************** *** 85,97 **** } #endif ! /* ! [Test] public void DefaultInstanceWithOracleClient20() { IDbProvider provider = DbProviderFactory.GetDbProvider("OracleODP-2.0"); Assert.AreEqual("Oracle, Oracle provider V2.102.2.20", provider.DbMetadata.ProductName); } [Test] public void DefaultInstanceWithMySql() --- 85,105 ---- } #endif ! ! [Test] ! [Ignore("until find out if can add oracle.dll to cvs repository")] public void DefaultInstanceWithOracleClient20() { IDbProvider provider = DbProviderFactory.GetDbProvider("OracleODP-2.0"); Assert.AreEqual("Oracle, Oracle provider V2.102.2.20", provider.DbMetadata.ProductName); + Assert.IsNotNull(provider.CreateCommand()); + Assert.IsNotNull(provider.CreateCommandBuilder()); + Assert.IsNotNull(provider.CreateConnection()); + Assert.IsNotNull(provider.CreateDataAdapter()); + Assert.IsNotNull(provider.CreateParameter()); + Assert.AreEqual(":Foo", provider.CreateParameterName("Foo")); } + /* [Test] public void DefaultInstanceWithMySql() |
From: Mark P. <mar...@us...> - 2007-10-16 16:08:26
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19090 Modified Files: dbproviders.xml Log Message: Index: dbproviders.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/dbproviders.xml,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** dbproviders.xml 11 Oct 2007 14:52:13 -0000 1.22 --- dbproviders.xml 16 Oct 2007 16:08:18 -0000 1.23 *************** *** 287,291 **** <constructor-arg name="commandBuilderDeriveParametersMethod" value="DeriveParameters"/> <constructor-arg name="parameterDbType" value="Oracle.DataAccess.Client.OracleDbType, Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342"/> ! <constructor-arg name="parameterDbTypeProperty" value="OracleDbType, Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342"/> <constructor-arg name="parameterIsNullableProperty" value="IsNullable"/> <constructor-arg name="parameterNamePrefix" value=":"/> --- 287,291 ---- <constructor-arg name="commandBuilderDeriveParametersMethod" value="DeriveParameters"/> <constructor-arg name="parameterDbType" value="Oracle.DataAccess.Client.OracleDbType, Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342"/> ! <constructor-arg name="parameterDbTypeProperty" value="OracleDbType"/> <constructor-arg name="parameterIsNullableProperty" value="IsNullable"/> <constructor-arg name="parameterNamePrefix" value=":"/> |
From: Mark P. <mar...@us...> - 2007-10-16 00:28:52
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Util In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31005/src/Spring/Spring.Core/Util Modified Files: AttributeUtils.cs SafeAttributeUtils.cs Log Message: misc cleanup updates AttibuteUtils Index: AttributeUtils.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Util/AttributeUtils.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AttributeUtils.cs 11 Oct 2007 05:57:25 -0000 1.1 --- AttributeUtils.cs 16 Oct 2007 00:28:49 -0000 1.2 *************** *** 37,41 **** /// <author>Stan Dvoychenko</author> /// <version>$Id$</version> ! internal static class AttributeUtils { //TODO: (SD) change back to private when SafeReflectionUtils2 is not required. --- 37,41 ---- /// <author>Stan Dvoychenko</author> /// <version>$Id$</version> ! public static class AttributeUtils { //TODO: (SD) change back to private when SafeReflectionUtils2 is not required. *************** *** 47,50 **** --- 47,57 ---- ParameterInfo parameterInfo); + /// <summary> + /// Provides array of <see cref="CustomAttributeBuilder"/> based onto the + /// attributes applied to the target type. + /// </summary> + public delegate CustomAttributeBuilder[] CustomAttributeBuildersProvider + (MemberInfo target, IList attributeTypesToExclude); + //TODO: (SD) change back to private when SafeReflectionUtils2 is not required. internal static ParameterBuilder CreateMethodParameter(MethodBuilder methodBuilder, *************** *** 137,145 **** if (attributeTypesToExclude != null) { ! // Welcome to the stone age!!!(SD) ! attributeTypesToExcludeList = new List<Type>(); ! foreach (Type type in attributeTypesToExclude) { ! attributeTypesToExcludeList.Add(type); } } --- 144,155 ---- if (attributeTypesToExclude != null) { ! lock (attributeTypesToExclude.SyncRoot) // reader lock would be enough (SD) { ! // Welcome to the stone age!!!(SD) ! attributeTypesToExcludeList = new List<Type>(); ! foreach (Type type in attributeTypesToExclude) ! { ! attributeTypesToExcludeList.Add(type); ! } } } *************** *** 215,233 **** } - //public static Attribute GetCustomAttributeBuilderAttribute( - // CustomAttributeBuilder attrBuilder) - //{ - // AssemblyBuilder assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(new AssemblyName( - // Guid.NewGuid().ToString()), AssemblyBuilderAccess.Run); - // ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("module"); - // TypeBuilder typeBuilder = moduleBuilder.DefineType("temptype"); - // typeBuilder.SetCustomAttribute(attrBuilder); - - // Type type = typeBuilder.CreateType(); - - // Attribute attribute = type.GetCustomAttributes(false)[0]; - - //} - private static CustomAttributeBuilder CreateCustomAttributeBuilder(CustomAttributeData attributeData) { --- 225,228 ---- *************** *** 270,274 **** propertiesToSet.Add(attributeProperties[j]); namedParameterValues[k++] = namedArgument.TypedValue.Value; ! //TODO: Check for the type can be applied (SD) break; } --- 265,275 ---- propertiesToSet.Add(attributeProperties[j]); namedParameterValues[k++] = namedArgument.TypedValue.Value; ! ! // The bellow few lines are only for testing purposes ! //if (namedArgument.TypedValue.ArgumentType == typeof(String)) ! //{ ! // namedParameterValues[k - 1] = ""; ! //} ! break; } Index: SafeAttributeUtils.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Util/SafeAttributeUtils.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SafeAttributeUtils.cs 11 Oct 2007 05:57:25 -0000 1.1 --- SafeAttributeUtils.cs 16 Oct 2007 00:28:49 -0000 1.2 *************** *** 22,28 **** --- 22,30 ---- using System; + using System.Globalization; using System.Reflection.Emit; using System.Reflection; using System.Collections; + using Common.Logging; namespace Spring.Util *************** *** 31,38 **** /// Utility class to discover and apply attributes to types, methods and parameters /// </summary> /// <author>Stan Dvoychenko</author> /// <version>$Id$</version> ! internal static class SafeAttributeUtils { /// <summary> --- 33,54 ---- /// Utility class to discover and apply attributes to types, methods and parameters /// </summary> + /// <remarks>SafeAttributeUtils is only a wrapper class for the + /// AttributeUtils for catching and swallowing any exceptions coming from it, in + /// which case it prevents exception from bubling transforming it + /// either into the boolean success flag for void methods or to the + /// null for collection/arrays return type of methods. This gives an + /// opportunity to the caller then to apply the old approach.</remarks> /// <author>Stan Dvoychenko</author> /// <version>$Id$</version> ! public static class SafeAttributeUtils { + #region Log Setup + /// <summary> + /// The shared <see cref="Common.Logging.ILog"/> instance for this class (and derived classes). + /// </summary> + static readonly ILog log = LogManager.GetLogger(typeof(SafeAttributeUtils)); + #endregion + + #region Wrapper methods /// <summary> *************** *** 57,67 **** return true; } ! catch (InvalidOperationException) { ! //TODO: (SD) Log but continue } return false; } /// <summary> /// Gets the assembly attributes. --- 73,84 ---- return true; } ! catch (ArgumentException ex) { ! HandleExceptionFromAttributeUtils(targetType, ex); } return false; } + /// <summary> /// Gets the assembly attributes. *************** *** 79,85 **** }); } ! catch (InvalidOperationException) { ! //TODO: (SD) Log but continue } return null; --- 96,102 ---- }); } ! catch (ArgumentException ex) { ! HandleExceptionFromAttributeUtils(target, ex); } return null; *************** *** 102,108 **** }); } ! catch (InvalidOperationException) { ! //TODO: (SD) Log but continue } return null; --- 119,125 ---- }); } ! catch (ArgumentException ex) { ! HandleExceptionFromAttributeUtils(target, ex); } return null; *************** *** 133,139 **** return AttributeUtils.GetMemberAttributes(target, attributeTypesToExclude); } ! catch (InvalidOperationException) { ! //TODO: (SD) Log but continue } return null; --- 150,156 ---- return AttributeUtils.GetMemberAttributes(target, attributeTypesToExclude); } ! catch (ArgumentException ex) { ! HandleExceptionFromAttributeUtils(target, ex); } return null; *************** *** 155,161 **** }); } ! catch (InvalidOperationException) { ! //TODO: (SD) Log but continue } return null; --- 172,178 ---- }); } ! catch (ArgumentException ex) { ! HandleExceptionFromAttributeUtils(target, ex); } return null; *************** *** 163,168 **** - #region Second circle of functional encapsulation - /// <summary> /// Applies the method parameter attributes. --- 180,183 ---- *************** *** 210,216 **** return true; } ! catch (Exception) //TODO: Identify the specific excepion (SD) { ! // TODO: (SD) Log about it, but continue } return false; --- 225,231 ---- return true; } ! catch (ArgumentException ex) { ! HandleExceptionFromAttributeUtils(parameter, ex); } return false; *************** *** 218,221 **** --- 233,289 ---- #endregion + + #region Utility Methods + + //TODO: (SD) For all those methods add more details about the target! + + private static void HandleExceptionFromAttributeUtils(MemberInfo target, Exception ex) + { + HandleExceptionFromAttributeUtils( + ((target != null) ? target.Name : "null"), ex); + } + private static void HandleExceptionFromAttributeUtils(ParameterInfo target, Exception ex) + { + HandleExceptionFromAttributeUtils( + ((target != null) ? target.Name : "null"), ex); + } + private static void HandleExceptionFromAttributeUtils(Assembly target, Exception ex) + { + HandleExceptionFromAttributeUtils( + ((target != null) ? target.FullName : "null"), ex); + } + private static void HandleExceptionFromAttributeUtils(Module target, Exception ex) + { + HandleExceptionFromAttributeUtils( + ((target != null) ? target.FullyQualifiedName : "null"), ex); + } + private static void HandleExceptionFromAttributeUtils(MethodInfo target, Exception ex) + { + HandleExceptionFromAttributeUtils( + ((target != null) ? target.Name : "null"), ex); + } + + /// <summary> + /// Handles the exception from <see cref="AttributeUtils"/> + /// </summary> + /// <param name="targetDetails">The target details.</param> + /// <param name="ex">The ex.</param> + private static void HandleExceptionFromAttributeUtils(string targetDetails, Exception ex) + { + // Unfortunately, .NET is throwing the ArgumentException for + // current issues with System.Enum and WebService attributes, + // ArgumentNull, ArgumentOutOfRange exceptions inherit from it + // which requires then a bit of extra code to rethrow those + // and any other that inherit from ArgumentException here. + if (ex.GetType() != typeof(ArgumentException)) + throw ex; + + log.Warn(String.Format(CultureInfo.InvariantCulture, + "Exception during the executing operation via CustomAttributeData for target {0}." + + " Falling back to the old method.", + targetDetails, ex)); + } + + #endregion } } |
From: Mark P. <mar...@us...> - 2007-10-16 00:28:52
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31005/test/Spring/Spring.Data.Tests/Data Modified Files: AdoPlatformTransactionManagerTests.cs Log Message: misc cleanup updates AttibuteUtils Index: AdoPlatformTransactionManagerTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/AdoPlatformTransactionManagerTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AdoPlatformTransactionManagerTests.cs 15 Oct 2007 13:31:16 -0000 1.3 --- AdoPlatformTransactionManagerTests.cs 16 Oct 2007 00:28:49 -0000 1.4 *************** *** 137,140 **** --- 137,141 ---- [Test] + [Ignore] public void ParticipatingTransactionWithRollbackOnly() { |
From: Mark P. <mar...@us...> - 2007-10-16 00:28:52
|
Update of /cvsroot/springnet/Spring.Net In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31005 Modified Files: readme.txt Log Message: misc cleanup updates AttibuteUtils Index: readme.txt =================================================================== RCS file: /cvsroot/springnet/Spring.Net/readme.txt,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** readme.txt 11 Oct 2007 16:05:49 -0000 1.32 --- readme.txt 16 Oct 2007 00:28:49 -0000 1.33 *************** *** 43,47 **** * "lib/Net" contains shared third-party libraries needed for building the framework * "lib/NHibernate10" contains NHibernate 1.0 dlls ! * "lib/NHibernate12" contains NHibernate 1.0 dlls * "doc" contains reference documentation, MSDN-style API help, and the Spring.NET xsd. * "examples" contains sample applications. --- 43,47 ---- * "lib/Net" contains shared third-party libraries needed for building the framework * "lib/NHibernate10" contains NHibernate 1.0 dlls ! * "lib/NHibernate12" contains NHibernate 1.2 dlls * "doc" contains reference documentation, MSDN-style API help, and the Spring.NET xsd. * "examples" contains sample applications. |
From: Mark P. <mar...@us...> - 2007-10-15 23:37:30
|
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9096 Modified Files: services.xml Log Message: trival cleanup Index: services.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/services.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** services.xml 15 Oct 2007 23:32:33 -0000 1.8 --- services.xml 15 Oct 2007 23:37:25 -0000 1.9 *************** *** 202,207 **** class and use it just like you would use original SimpleUserManager implementation. As you can see, by coding your services as plain .Net ! objects, against well defined service interfaces, you can achieve true ! location transparency for your services through configuration.</para> </sect1> </chapter> \ No newline at end of file --- 202,209 ---- class and use it just like you would use original SimpleUserManager implementation. As you can see, by coding your services as plain .Net ! objects, against well defined service interfaces, you can an easy ! pluggability for your service implementation though this ! confiuration, while keeping the core business logic in a technology ! agnostic PONO, i.e. Plain Ordinary .Net Object.</para> </sect1> </chapter> \ No newline at end of file |
From: Mark P. <mar...@us...> - 2007-10-15 23:32:47
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6625 Modified Files: SimpleInstantiationStrategy.cs Log Message: updates docs on example with portable service abstraction. change NotImplementedException to InvalidOperationException in SimpleInstantiationStrategy. Index: SimpleInstantiationStrategy.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/SimpleInstantiationStrategy.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** SimpleInstantiationStrategy.cs 13 Oct 2007 23:01:08 -0000 1.16 --- SimpleInstantiationStrategy.cs 15 Oct 2007 23:32:39 -0000 1.17 *************** *** 212,216 **** /// <p> /// The default implementation of this method is to throw a ! /// <see cref="System.NotImplementedException"/>. /// </p> /// <p> --- 212,216 ---- /// <p> /// The default implementation of this method is to throw a ! /// <see cref="System.InvalidOperationException"/>. /// </p> /// <p> *************** *** 249,253 **** /// <p> /// The default implementation of this method is to throw a ! /// <see cref="System.NotImplementedException"/>. /// </p> /// <p> --- 249,253 ---- /// <p> /// The default implementation of this method is to throw a ! /// <see cref="System.InvalidOperationException"/>. /// </p> /// <p> |
Update of /cvsroot/springnet/Spring.Net/doc/reference/src/images In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6559/images Added Files: web-exporter-calc-svc-aop-add.jpg web-exporter-calc-svc-aop.jpg web-exporter-calc-svc-main.jpg web-exporter-calc-svc.jpg Log Message: updates docs on example with portable service abstraction. change NotImplementedException to InvalidOperationException in SimpleInstantiationStrategy. --- NEW FILE: web-exporter-calc-svc-main.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: web-exporter-calc-svc-aop-add.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: web-exporter-calc-svc.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: web-exporter-calc-svc-aop.jpg --- (This appears to be a binary file; contents omitted.) |
From: Mark P. <mar...@us...> - 2007-10-15 23:32:37
|
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6559 Modified Files: remoting-quickstart.xml services.xml webservices.xml Log Message: updates docs on example with portable service abstraction. change NotImplementedException to InvalidOperationException in SimpleInstantiationStrategy. Index: webservices.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/webservices.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** webservices.xml 10 Oct 2007 03:03:28 -0000 1.11 --- webservices.xml 15 Oct 2007 23:32:33 -0000 1.12 *************** *** 46,49 **** --- 46,53 ---- implementation.</para> + <para>An example using the web service exporter can be found in quickstart + example named 'calculator'. More information can be found here '<link + linkend="websvc-example">Web Services example</link>'.</para> + <sect2> <title>Removing the need for .asmx files</title> Index: services.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/services.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** services.xml 10 Oct 2007 03:03:28 -0000 1.7 --- services.xml 15 Oct 2007 23:32:33 -0000 1.8 *************** *** 46,50 **** programming .NET Enterprise Services. An excellent reference for such information is Christian Nagel's "Enterprise Services with the .NET ! Framework"</para> </sect1> --- 46,52 ---- programming .NET Enterprise Services. An excellent reference for such information is Christian Nagel's "Enterprise Services with the .NET ! Framework" Spring.NET includes an example of using these classes, the ! 'calculator' example. More information can be found in the section, .<link ! linkend="entsvc-example">NET Enterprise Services example.</link></para> </sect1> *************** *** 61,64 **** --- 63,68 ---- <itemizedlist> <listitem> + + <classname>Spring.Enterprise.ServicedComponentExporter</classname> Index: remoting-quickstart.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/remoting-quickstart.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** remoting-quickstart.xml 9 Aug 2007 06:30:17 -0000 1.11 --- remoting-quickstart.xml 15 Oct 2007 23:32:33 -0000 1.12 *************** *** 1,5 **** <?xml version="1.0" encoding="UTF-8"?> <chapter id="remoting-quickstart"> ! <title>.NET Remoting Quick start</title> <sect1 id="qs-remoting-introduction"> --- 1,5 ---- <?xml version="1.0" encoding="UTF-8"?> <chapter id="remoting-quickstart"> ! <title>Portable Service Abstraction Quick Start</title> <sect1 id="qs-remoting-introduction"> *************** *** 7,15 **** <para>This quickstart demonstrates the basic usage of Spring.NET's ! remoting infrastructure. The infrastructure classes are located in the <literal>Spring.Services</literal> assembly under the ! <literal>Spring.Services.Remoting</literal>namespace. The overall strategy ! is to export .NET objects on the server side as either CAO or SAO objects ! using <classname>CaoExporter</classname> or <classname>SaoExporter</classname> and obtain references to these objects on the client side using <classname>CaoFactoryObject</classname> and --- 7,24 ---- <para>This quickstart demonstrates the basic usage of Spring.NET's ! portable service abstraction functionality. Sections 2-5 demonstrate the ! use of .NET Remoting, Section 6 shows the use of the ! ServicedComponentExporter for .NET Enterprise Services, and Section 7 ! shows the use of the WebServiceExporter.</para> ! </sect1> ! ! <sect1 id="qs-remoting-projectstructure"> ! <title>.NET Remoting Example</title> ! ! <para>The infrastructure classes are located in the <literal>Spring.Services</literal> assembly under the ! <literal>Spring.Services.Remoting</literal> namespace. The overall ! strategy is to export .NET objects on the server side as either CAO or SAO ! objects using <classname>CaoExporter</classname> or <classname>SaoExporter</classname> and obtain references to these objects on the client side using <classname>CaoFactoryObject</classname> and *************** *** 18,25 **** to .NET remoting you may find the links to introductory remoting material presented at the conclusion of this quickstart of some help.</para> - </sect1> - - <sect1 id="qs-remoting-projectstructure"> - <title>The Remoting Sample Project</title> <para>As usual with quick start examples in Spring.NET, the classes used --- 27,30 ---- *************** *** 586,596 **** </sect1> <sect1 id="qs-remoting-additional"> <title>Additional Resources</title> ! <para>.NET remoting is a huge topic. Some introductory articles on .NET ! remoting can be found online at MSDN. Ingo Rammer is also a very good ! authority on .NET remoting, and the .NET Remoting FAQ (link below) which ! is maintained by Ingo is chock full of useful information.</para> <para><itemizedlist> --- 591,793 ---- </sect1> + <sect1> + <title id="entsvc-example">.NET Enterprise Services Example</title> + + <para>The .NET Enterprise Services example is located in the project + Spring.Calculator.RegisterComponentServices.2005.csproj or + Spring.Calculator.RegisterComponentServices.2003.csproj, depending on the + use of .NET 1.1 or 2.0. The example uses the previous AdvancedCalculator + implementation and then imports the embedded configuration file + 'enterpriseServices.xml' from the namespace + Spring.Calculator.RegisterComponentServices.Config. The top level + configuration is shown below</para> + + <programlisting> <spring> + + <context> + <resource uri="config://spring/objects" /> + <resource uri="assembly://Spring.Calculator.RegisterComponentServices/Spring.Calculator.RegisterComponentServices.Config/enterpriseServices.xml" /> + </context> + + <objects xmlns="http://www.springframework.net"> + <description>Definitions of objects to be registered.</description> + + <object id="calculatorService" type="Spring.Calculator.Services.AdvancedCalculator, Spring.Calculator.Services" /> + + </objects> + + </spring></programlisting> + + <para>The exporter that adapts the AdvancedCalculator for use as a + EnterpriseService component is defined first in enterpriseServices.xml. + Second is defined an exporter that will host the exported Enterprise + Services component application by signing the assembly, registering it + with the specified COM+ application name. If application does not exist it + will create it and configure it using values specified for Description, + AccessControl and Roles properties. The configuration file for + enterpriseServices.xml is shown below</para> + + <para><programlisting><objects xmlns="http://www.springframework.net"> + + <description>enterpriseService</description> + + <object id="calculatorComponent" type="Spring.EnterpriseServices.ServicedComponentExporter, Spring.Services"> + <property name="TargetName" value="calculatorService" /> + <property name="TypeAttributes"> + <list> + <object type="System.EnterpriseServices.TransactionAttribute, System.EnterpriseServices" /> + </list> + </property> + <property name="MemberAttributes"> + <dictionary> + <entry key="*"> + <list> + <object type="System.EnterpriseServices.AutoCompleteAttribute, System.EnterpriseServices" /> + </list> + </entry> + </dictionary> + </property> + </object> + + <object type="Spring.EnterpriseServices.EnterpriseServicesExporter, Spring.Services"> + <property name="ApplicationName"> + <value>Spring Calculator Application</value> + </property> + <property name="Description"> + <value>Spring Calculator application.</value> + </property> + <property name="AccessControl"> + <object type="System.EnterpriseServices.ApplicationAccessControlAttribute, System.EnterpriseServices"> + <property name="AccessChecksLevel"> + <value>ApplicationComponent</value> + </property> + </object> + </property> + <property name="Roles"> + <list> + <value>Admin : Administrator role</value> + <value>User : User role</value> + <value>Manager : Administrator role</value> + </list> + </property> + <property name="Components"> + <list> + <ref object="calculatorComponent" /> + </list> + </property> + <property name="Assembly"> + <value>Spring.Calculator.EnterpriseServices</value> + </property> + </object> + + </objects></programlisting></para> + </sect1> + + <sect1 id="websvc-example"> + <title>Web Services Example</title> + + <para>The WebServices example shows how to export the AdvancedCalculator + as a web service an AOP proxy of AdvancedCalculator that has logging + advice applied to it. The main configuration file, Web.config, includes + information from three locations as shown below</para> + + <programlisting> <context> + <resource uri="config://spring/objects"/> + <resource uri="~/Config/webServices.xml"/> + <resource uri="~/Config/webServices-aop.xml"/> + </context></programlisting> + + <para>The config section 'spring/objects' in Web.config contains the + definition for the 'plain' Advancd calculator, as well as the definitions + to create an AOP proxy of an AdvancedCalculator that adds logging advice. + These definitions are shown below<programlisting> <objects xmlns="http://www.springframework.net"> + + <!-- Aspect --> + + <object id="CommonLoggingAroundAdvice" type="Spring.Aspects.Logging.CommonLoggingAroundAdvice, Spring.Aspects"> + <property name="Level" value="Debug"/> + </object> + + <!-- Service --> + + <!-- 'plain object' for AdvancedCalculator --> + <object id="calculator" type="Spring.Calculator.Services.AdvancedCalculator, Spring.Calculator.Services"/> + + <!-- AdvancedCalculator object with AOP logging advice applied. --> + <object id="calculatorWeaved" type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop"> + <property name="target" ref="calculator"/> + <property name="interceptorNames"> + <list> + <value>CommonLoggingAroundAdvice</value> + </list> + </property> + </object> + + </objects></programlisting>The configuraiton file webService.xml + simply exports the named calculator object </para> + + <programlisting> <object id="calculatorService" type="Spring.Web.Services.WebServiceExporter, Spring.Web"> + <property name="TargetName" value="calculator" /> + <property name="Namespace" value="http://SpringCalculator/WebServices" /> + <property name="Description" value="Spring Calculator Web Services" /> + </object></programlisting> + + <para>Whereas the webService-aop.xml exports the calculator instance that + has AOP advice applied to it.</para> + + <programlisting> <object id="calculatorServiceWeaved" type="Spring.Web.Services.WebServiceExporter, Spring.Web"> + <property name="TargetName" value="calculatorWeaved" /> + <property name="Namespace" value="http://SpringCalculator/WebServices" /> + <property name="Description" value="Spring Calculator Web Services" /> + </object> + </programlisting> + + <para>Setting the project to run web project as the startup, you will be + presented with a screen as shown below</para> + + <para><mediaobject> + <imageobject> + <imagedata fileref="images/web-exporter-calc-svc-main.jpg" + format="JPG" /> + </imageobject> + </mediaobject>Selecting the CalculatorService and + CalculatorServiceWeaved links will bring you to the standard user + interface generated for browsing a web service, as shown below<mediaobject> + <imageobject> + <imagedata fileref="images/web-exporter-calc-svc.jpg" /> + </imageobject> + </mediaobject></para> + + <para>And similarly for the calculator service with AOP applied</para> + + <mediaobject> + <imageobject> + <imagedata fileref="images/web-exporter-calc-svc-aop.jpg" /> + </imageobject> + </mediaobject> + + <para>Invoking the Add method for calculatorServiceWeaved shows the + screen</para> + + <mediaobject> + <imageobject> + <imagedata fileref="images/web-exporter-calc-svc-aop-add.jpg" /> + </imageobject> + </mediaobject> + + <para>Invoking add will then show the result '4' in a new browser instance + and the log file log.txt will contain the following entires</para> + + <programlisting>2007-10-15 17:59:47,375 [DEBUG] Spring.Aspects.Logging.CommonLoggingAroundAdvice - Intercepted call : about to invoke method 'Add' + 2007-10-15 17:59:47,421 [DEBUG] Spring.Aspects.Logging.CommonLoggingAroundAdvice - Intercepted call : returned '4'</programlisting> + </sect1> + <sect1 id="qs-remoting-additional"> <title>Additional Resources</title> ! <para>Some introductory articles on .NET remoting can be found online at ! MSDN. Ingo Rammer is also a very good authority on .NET remoting, and the ! .NET Remoting FAQ (link below) which is maintained by Ingo is chock full ! of useful information.</para> <para><itemizedlist> |
From: Mark P. <mar...@us...> - 2007-10-15 23:30:40
|
Update of /cvsroot/springnet/Spring.Net/src/Spring In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5569 Modified Files: CommonAssemblyInfo.cs Log Message: update assembly product information to say RC2 Index: CommonAssemblyInfo.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/CommonAssemblyInfo.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** CommonAssemblyInfo.cs 9 Aug 2007 06:50:15 -0000 1.21 --- CommonAssemblyInfo.cs 15 Oct 2007 23:30:33 -0000 1.22 *************** *** 15,19 **** #endif [assembly: AssemblyCompany("http://www.springframework.net")] ! [assembly: AssemblyProduct("Spring.NET Framework 1.1 RC1")] [assembly: AssemblyCopyright("Copyright 2002-2007 Spring.NET Framework Team.")] [assembly: AssemblyTrademark("Apache License, Version 2.0")] --- 15,19 ---- #endif [assembly: AssemblyCompany("http://www.springframework.net")] ! [assembly: AssemblyProduct("Spring.NET Framework 1.1 RC2")] [assembly: AssemblyCopyright("Copyright 2002-2007 Spring.NET Framework Team.")] [assembly: AssemblyTrademark("Apache License, Version 2.0")] |
From: Mark P. <mar...@us...> - 2007-10-15 23:29:46
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.Calculator/lib/net/2.0 In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5053/2.0 Modified Files: Common.Logging.Log4Net.dll Log Message: update common.logging libs that are local to example project. Index: Common.Logging.Log4Net.dll =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.Calculator/lib/net/2.0/Common.Logging.Log4Net.dll,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsUpI0EQ and /tmp/cvsy6tO9x differ |
From: Mark P. <mar...@us...> - 2007-10-15 23:29:46
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.Calculator/lib/net/1.1 In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5053/1.1 Modified Files: Common.Logging.Log4Net.dll Log Message: update common.logging libs that are local to example project. Index: Common.Logging.Log4Net.dll =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.Calculator/lib/net/1.1/Common.Logging.Log4Net.dll,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsXcWjPK and /tmp/cvsEtaI6r differ |
From: Mark P. <mar...@us...> - 2007-10-15 13:31:21
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8746 Modified Files: AdoPlatformTransactionManagerTests.cs Log Message: fix build... Index: AdoPlatformTransactionManagerTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/AdoPlatformTransactionManagerTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AdoPlatformTransactionManagerTests.cs 13 Oct 2007 22:42:39 -0000 1.2 --- AdoPlatformTransactionManagerTests.cs 15 Oct 2007 13:31:16 -0000 1.3 *************** *** 82,86 **** Assert.IsTrue(!TransactionSynchronizationManager.SynchronizationActive, "Synchronizations not active"); ! object result = tt.Execute(new TransactionCommitTxCallback(dbProvider)); Assert.IsTrue(!TransactionSynchronizationManager.HasResource(dbProvider), "Hasn't thread db provider"); --- 82,86 ---- Assert.IsTrue(!TransactionSynchronizationManager.SynchronizationActive, "Synchronizations not active"); ! tt.Execute(new TransactionCommitTxCallback(dbProvider)); Assert.IsTrue(!TransactionSynchronizationManager.HasResource(dbProvider), "Hasn't thread db provider"); *************** *** 171,175 **** outerTransactionBoundaryReached = true; tm.Commit(ts); ! } catch (UnexpectedRollbackException ex) { // expected --- 171,175 ---- outerTransactionBoundaryReached = true; tm.Commit(ts); ! } catch (UnexpectedRollbackException) { // expected *************** *** 333,341 **** } ! public void AfterCompletion(TransactionSynchronizationStatus status) { Assert.IsFalse(afterCompletionCalled); afterCompletionCalled = true; ! Assert.IsTrue(status == this.status); Assert.IsTrue(TransactionSynchronizationManager.HasResource(provider)); } --- 333,341 ---- } ! public void AfterCompletion(TransactionSynchronizationStatus syncStatus) { Assert.IsFalse(afterCompletionCalled); afterCompletionCalled = true; ! Assert.IsTrue(syncStatus == status); Assert.IsTrue(TransactionSynchronizationManager.HasResource(provider)); } |
From: Mark P. <mar...@us...> - 2007-10-13 23:01:23
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15795 Modified Files: DbParameters.cs IDbParameters.cs Log Message: remove extraneous NotImplementedExceptions... Index: IDbParameters.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/IDbParameters.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** IDbParameters.cs 31 Jul 2007 03:48:15 -0000 1.10 --- IDbParameters.cs 13 Oct 2007 23:01:17 -0000 1.11 *************** *** 127,132 **** void SetValue(string name, object parameterValue); - void DeriveParameters(string storedProcedureName); - } } \ No newline at end of file --- 127,130 ---- Index: DbParameters.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/DbParameters.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DbParameters.cs 9 Aug 2007 01:54:22 -0000 1.11 --- DbParameters.cs 13 Oct 2007 23:01:17 -0000 1.12 *************** *** 262,271 **** } - public void DeriveParameters(string storedProcedureName) - { - throw new NotImplementedException(); - } - - protected void AssignParameterType(IDbDataParameter parameter, Enum parameterType) --- 262,265 ---- |
From: Mark P. <mar...@us...> - 2007-10-13 23:01:11
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15751 Modified Files: SimpleInstantiationStrategy.cs Log Message: remove extraneous NotImplementedExceptions... Index: SimpleInstantiationStrategy.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/SimpleInstantiationStrategy.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** SimpleInstantiationStrategy.cs 31 Jul 2007 18:16:50 -0000 1.15 --- SimpleInstantiationStrategy.cs 13 Oct 2007 23:01:08 -0000 1.16 *************** *** 238,242 **** RootObjectDefinition definition, string objectName, IObjectFactory factory) { ! throw new NotImplementedException(); } --- 238,242 ---- RootObjectDefinition definition, string objectName, IObjectFactory factory) { ! throw new InvalidOperationException("Method Injection not supported in SimpleInstantiationStrategy"); } *************** *** 284,288 **** ConstructorInfo constructor, object[] arguments) { ! throw new NotImplementedException(); } } --- 284,288 ---- ConstructorInfo constructor, object[] arguments) { ! throw new InvalidOperationException("Method Injection not supported in SimpleInstantiationStrategy"); } } |
From: Mark P. <mar...@us...> - 2007-10-13 22:42:44
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8307 Modified Files: AdoPlatformTransactionManagerTests.cs Log Message: add some tests for AdoPlatformTransactionManager Index: AdoPlatformTransactionManagerTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/AdoPlatformTransactionManagerTests.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AdoPlatformTransactionManagerTests.cs 3 Jul 2007 22:30:29 -0000 1.1 --- AdoPlatformTransactionManagerTests.cs 13 Oct 2007 22:42:39 -0000 1.2 *************** *** 21,25 **** --- 21,32 ---- #region Imports + using System; + using System.Data; using NUnit.Framework; + using Rhino.Mocks; + using Spring.Data.Common; + using Spring.Data.Core; + using Spring.Transaction; + using Spring.Transaction.Support; #endregion *************** *** 35,49 **** public class AdoPlatformTransactionManagerTests { [SetUp] public void Setup() { } [Test] ! public void Test() { } ! } } \ No newline at end of file --- 42,345 ---- public class AdoPlatformTransactionManagerTests { + private MockRepository mocks; + [SetUp] public void Setup() { + mocks = new MockRepository(); } + // todo test tx sync calls. + [Test] ! public void TransactionCommit() { + IDbProvider dbProvider = (IDbProvider)mocks.CreateMock(typeof(IDbProvider)); + IDbConnection connection = (IDbConnection)mocks.CreateMock(typeof(IDbConnection)); + IDbTransaction transaction = (IDbTransaction) mocks.CreateMock(typeof (IDbTransaction)); + + using (mocks.Ordered()) + { + Expect.Call(dbProvider.CreateConnection()).Return(connection); + connection.Open(); + LastCall.On(connection).Repeat.Once(); + Expect.Call(connection.BeginTransaction(IsolationLevel.Unspecified)).Return(transaction); + //standard tx timeout. + + + transaction.Commit(); + LastCall.On(transaction).Repeat.Once(); + + connection.Dispose(); + } + + mocks.ReplayAll(); + + AdoPlatformTransactionManager tm = new AdoPlatformTransactionManager(dbProvider); + TransactionTemplate tt = new TransactionTemplate(tm); + + Assert.IsTrue(!TransactionSynchronizationManager.HasResource(dbProvider), "Hasn't thread db provider"); + Assert.IsTrue(!TransactionSynchronizationManager.SynchronizationActive, "Synchronizations not active"); + + object result = tt.Execute(new TransactionCommitTxCallback(dbProvider)); + + Assert.IsTrue(!TransactionSynchronizationManager.HasResource(dbProvider), "Hasn't thread db provider"); + Assert.IsTrue(!TransactionSynchronizationManager.SynchronizationActive, "Synchronizations not active"); + + mocks.VerifyAll(); + } ! [Test] ! public void TransactionRollback() ! { ! IDbProvider dbProvider = (IDbProvider)mocks.CreateMock(typeof(IDbProvider)); ! IDbConnection connection = (IDbConnection)mocks.CreateMock(typeof(IDbConnection)); ! IDbTransaction transaction = (IDbTransaction)mocks.CreateMock(typeof(IDbTransaction)); ! ! using (mocks.Ordered()) ! { ! Expect.Call(dbProvider.CreateConnection()).Return(connection); ! connection.Open(); ! LastCall.On(connection).Repeat.Once(); ! Expect.Call(connection.BeginTransaction(IsolationLevel.Unspecified)).Return(transaction); ! //standard tx timeout. ! transaction.Rollback(); ! LastCall.On(transaction).Repeat.Once(); ! ! connection.Dispose(); ! } ! mocks.ReplayAll(); ! ! AdoPlatformTransactionManager tm = new AdoPlatformTransactionManager(dbProvider); ! TransactionTemplate tt = new TransactionTemplate(tm); ! ! Assert.IsTrue(!TransactionSynchronizationManager.HasResource(dbProvider), "Hasn't thread db provider"); ! Assert.IsTrue(!TransactionSynchronizationManager.SynchronizationActive, "Synchronizations not active"); ! ! Exception ex = new ArgumentException("test exception"); ! try ! { ! tt.Execute(new TransactionRollbackTxCallback(dbProvider, ex)); ! Assert.Fail("Should have thrown exception"); ! } ! catch (ArgumentException e) ! { ! Assert.AreEqual(ex, e); ! } ! ! Assert.IsTrue(!TransactionSynchronizationManager.HasResource(dbProvider), "Hasn't thread db provider"); ! Assert.IsTrue(!TransactionSynchronizationManager.SynchronizationActive, "Synchronizations not active"); ! ! ! mocks.VerifyAll(); ! } ! ! [Test] ! public void ParticipatingTransactionWithRollbackOnly() ! { ! IDbProvider dbProvider = (IDbProvider)mocks.CreateMock(typeof(IDbProvider)); ! IDbConnection connection = (IDbConnection)mocks.CreateMock(typeof(IDbConnection)); ! IDbTransaction transaction = (IDbTransaction)mocks.CreateMock(typeof(IDbTransaction)); ! ! Expect.Call(dbProvider.CreateConnection()).Return(connection); ! connection.Open(); ! LastCall.On(connection).Repeat.Once(); ! Expect.Call(connection.BeginTransaction(IsolationLevel.Unspecified)).Return(transaction); ! //standard tx timeout. ! transaction.Rollback(); ! LastCall.On(transaction).Repeat.Once(); ! connection.Dispose(); ! ! AdoPlatformTransactionManager tm = new AdoPlatformTransactionManager(dbProvider); ! ! Assert.IsTrue(!TransactionSynchronizationManager.HasResource(dbProvider), "Hasn't thread db provider"); ! Assert.IsTrue(!TransactionSynchronizationManager.SynchronizationActive, "Synchronizations not active"); ! ! ITransactionStatus ts = tm.GetTransaction(new DefaultTransactionDefinition()); ! TestTransactionSynchronization synch = ! new TestTransactionSynchronization(dbProvider, TransactionSynchronizationStatus.Rolledback); ! TransactionSynchronizationManager.RegisterSynchronization(synch); ! ! bool outerTransactionBoundaryReached = false; ! try ! { ! Assert.IsTrue(ts.IsNewTransaction); ! TransactionTemplate tt = new TransactionTemplate(tm); ! TransactionTemplate tt2 = new TransactionTemplate(tm); ! tt.Execute(new ParticipatingTxWithRollbackOnlyTxCallback(tt2, dbProvider)); ! outerTransactionBoundaryReached = true; ! tm.Commit(ts); ! } catch (UnexpectedRollbackException ex) ! { ! // expected ! if (!outerTransactionBoundaryReached) ! { ! tm.Rollback(ts); ! } ! Assert.IsTrue(outerTransactionBoundaryReached); ! } ! ! } ! } ! ! #region Supporting class for TransactionCommit test ! ! internal class TransactionCommitTxCallback : ITransactionCallback ! { ! private IDbProvider provider; ! ! public TransactionCommitTxCallback(IDbProvider provider) ! { ! this.provider = provider; ! } ! ! public object DoInTransaction(ITransactionStatus status) ! { ! Assert.IsTrue(TransactionSynchronizationManager.HasResource(provider), "Hasn't thread db provider"); ! Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive); ! Assert.IsTrue(status.IsNewTransaction, "Is new transaction"); ! Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); ! return null; ! ! } ! } ! ! #endregion ! ! #region Supporting class for TransactionRollback test ! ! internal class TransactionRollbackTxCallback : ITransactionCallback ! { ! private IDbProvider provider; ! private Exception exception; ! ! public TransactionRollbackTxCallback(IDbProvider provider, Exception exception) ! { ! this.provider = provider; ! this.exception = exception; ! } ! ! public object DoInTransaction(ITransactionStatus status) ! { ! Assert.IsTrue(TransactionSynchronizationManager.HasResource(provider), "Hasn't thread db provider"); ! Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive); ! Assert.IsTrue(status.IsNewTransaction, "Is new transaction"); ! throw exception; ! } ! } ! ! #endregion ! ! #region Supporting class for ParticipatingTxWithRollbackOnly test ! ! internal class ParticipatingTxWithRollbackOnlyTxCallback : ITransactionCallback ! { ! private TransactionTemplate innerTxTemplate; ! private IDbProvider dbProvider; ! ! ! public ParticipatingTxWithRollbackOnlyTxCallback(TransactionTemplate transactionTemplate, IDbProvider dbProvider) ! { ! innerTxTemplate = transactionTemplate; ! this.dbProvider = dbProvider; ! } ! ! public object DoInTransaction(ITransactionStatus status) ! { ! Assert.IsTrue(!status.IsNewTransaction, "Is existing transaction"); ! Assert.IsFalse(status.RollbackOnly,"Is not rollback-only"); ! innerTxTemplate.Execute(new ParticipatingTxWithRollbackOnlyTxCallback2(dbProvider)); ! Assert.IsTrue(!status.IsNewTransaction, "Is existing transaction"); ! Assert.IsTrue(status.RollbackOnly, "Is rollback-only"); ! return null; ! } ! } ! ! internal class ParticipatingTxWithRollbackOnlyTxCallback2 : ITransactionCallback ! { ! private IDbProvider dbProvider; ! ! public ParticipatingTxWithRollbackOnlyTxCallback2(IDbProvider dbProvider) ! { ! this.dbProvider = dbProvider; ! } ! ! public object DoInTransaction(ITransactionStatus status) ! { ! Assert.IsTrue(TransactionSynchronizationManager.HasResource(dbProvider), "Has thread connection"); ! Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive, "Synchronization active"); ! Assert.IsTrue(!status.IsNewTransaction, "Is existing transaction"); ! //status.RollbackOnly; ! return null; ! } } + + #endregion + + #region Helper class + + internal class TestTransactionSynchronization : ITransactionSynchronization + { + private IDbProvider provider; + private TransactionSynchronizationStatus status; + + public bool beforeCommitCalled; + public bool beforeCompletionCalled; + public bool afterCommitCalled; + public bool afterCompletionCalled; + + public TestTransactionSynchronization(IDbProvider provider, TransactionSynchronizationStatus synchronizationStatus) + { + this.provider = provider; + status = synchronizationStatus; + } + + + public void Suspend() + { + + } + + public void Resume() + { + + } + + public void BeforeCommit(bool readOnly) + { + if (status == TransactionSynchronizationStatus.Committed) + { + Assert.Fail("Should never be called"); + } + Assert.IsFalse(beforeCommitCalled); + beforeCommitCalled = true; + } + + public void AfterCommit() + { + if (status != TransactionSynchronizationStatus.Committed) + { + Assert.Fail("Should never be called"); + } + Assert.IsFalse(afterCommitCalled); + afterCommitCalled = true; + } + + public void BeforeCompletion() + { + Assert.IsFalse(beforeCompletionCalled); + beforeCompletionCalled = true; + } + + public void AfterCompletion(TransactionSynchronizationStatus status) + { + Assert.IsFalse(afterCompletionCalled); + afterCompletionCalled = true; + Assert.IsTrue(status == this.status); + Assert.IsTrue(TransactionSynchronizationManager.HasResource(provider)); + } + } + + #endregion } \ No newline at end of file |
From: Mark P. <mar...@us...> - 2007-10-13 22:42:41
|
Update of /cvsroot/springnet/Spring.Net/doc/docx/Spring-1.1/net-2.0 In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8288/net-2.0 Modified Files: Spring-1.1.0.dxp Log Message: add some tests for AdoPlatformTransactionManager Index: Spring-1.1.0.dxp =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/docx/Spring-1.1/net-2.0/Spring-1.1.0.dxp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Spring-1.1.0.dxp 10 Aug 2007 19:01:42 -0000 1.8 --- Spring-1.1.0.dxp 13 Oct 2007 22:42:33 -0000 1.9 *************** *** 1,5 **** <?xml version="1.0" encoding="UTF-8" standalone="yes"?> ! <DocumentXProject Version="5.0" CompileHelpFile="True" RefreshIfExists="False" DocumentSourceCode="False" AlwaysCopySupportFiles="True" PropertyCommentsFrom="0" RelationshipsFrom="2" DefaultRelsOnlyForCollections="True" ProjectGroupName="Spring-1.1.0 RC1" HTMLHelpVersion="1" HHNamespace="Spring.NET" HHIdentifier="Spring.NET-1.1-RC1" H2PlugIn="True" H2PlugInNamespace="MS.VSIPCC.v80" LocaleID="0" ExcludeFiltersRegExp="False" OutputFileExtension=".html"> ! <OutputLocation OutputFolder="L:\r\" HelpFileName="L:\release\Spring.Net\doc\sdk\Spring-1.1\net-2.0\htmlhelp1and2\Spring.NET.chm" UseFilenameAliases="True" StripMetadata="False" ClearBeforeBuild="True" RemoveOutputFilesAfterCompile="False"/> <HTMLHelpOptions UseALinkMenus="False"/> <OtherOptions CreateContextLinks="True" WriteHelpDescriptions="True" CopySourceCode="False" CreateWinHelpStub="False" Language="English"/> --- 1,5 ---- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> ! <DocumentXProject Version="5.0" CompileHelpFile="True" RefreshIfExists="False" DocumentSourceCode="False" AlwaysCopySupportFiles="True" PropertyCommentsFrom="0" RelationshipsFrom="2" DefaultRelsOnlyForCollections="True" ProjectGroupName="Spring-1.1.0 RC2" HTMLHelpVersion="2" HHNamespace="Spring.NET" HHIdentifier="Spring.NET-1.1-RC2" H2PlugIn="True" H2PlugInNamespace="MS.VSIPCC.v80" LocaleID="0" ExcludeFiltersRegExp="False" OutputFileExtension=".html"> ! <OutputLocation OutputFolder="L:\release\Spring.Net\doc\sdk\Spring-1.1\net-2.0\web\" HelpFileName="L:\release\Spring.Net\doc\sdk\Spring-1.1\net-2.0\htmlhelp1and2\Spring.NET.hxs" UseFilenameAliases="True" StripMetadata="False" ClearBeforeBuild="True" RemoveOutputFilesAfterCompile="False"/> <HTMLHelpOptions UseALinkMenus="False"/> <OtherOptions CreateContextLinks="True" WriteHelpDescriptions="True" CopySourceCode="False" CreateWinHelpStub="False" Language="English"/> |
From: Mark P. <mar...@us...> - 2007-10-13 22:42:41
|
Update of /cvsroot/springnet/Spring.Net/doc/docx/Spring-1.1/net-1.1 In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8288/net-1.1 Modified Files: Spring-1.1.0.dxp Log Message: add some tests for AdoPlatformTransactionManager Index: Spring-1.1.0.dxp =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/docx/Spring-1.1/net-1.1/Spring-1.1.0.dxp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Spring-1.1.0.dxp 10 Aug 2007 19:01:42 -0000 1.8 --- Spring-1.1.0.dxp 13 Oct 2007 22:42:33 -0000 1.9 *************** *** 1,5 **** <?xml version="1.0" encoding="UTF-8" standalone="yes"?> ! <DocumentXProject Version="5.0" CompileHelpFile="True" RefreshIfExists="True" DocumentSourceCode="False" AlwaysCopySupportFiles="True" PropertyCommentsFrom="0" RelationshipsFrom="2" DefaultRelsOnlyForCollections="True" ProjectGroupName="Spring-1.1.0 RC1" HTMLHelpVersion="1" HHNamespace="Spring.NET" HHIdentifier="Spring.NET-1.1-RC1" H2PlugIn="True" H2PlugInNamespace="MS.VSCC,MS.VSCC.2003" LocaleID="0" ExcludeFiltersRegExp="False" OutputFileExtension=".html"> ! <OutputLocation OutputFolder="L:\r\" HelpFileName="L:\release\Spring.Net\doc\sdk\Spring-1.1\net-1.1\htmlhelp1and2\Spring.NET.chm" UseFilenameAliases="True" StripMetadata="False" ClearBeforeBuild="True" RemoveOutputFilesAfterCompile="False"/> <HTMLHelpOptions UseALinkMenus="False"/> <OtherOptions CreateContextLinks="True" WriteHelpDescriptions="True" CopySourceCode="False" CreateWinHelpStub="False" Language="English"/> --- 1,5 ---- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> ! <DocumentXProject Version="5.0" CompileHelpFile="True" RefreshIfExists="True" DocumentSourceCode="False" AlwaysCopySupportFiles="True" PropertyCommentsFrom="0" RelationshipsFrom="2" DefaultRelsOnlyForCollections="True" ProjectGroupName="Spring-1.1.0 RC2" HTMLHelpVersion="2" HHNamespace="Spring.NET" HHIdentifier="Spring.NET-1.1-RC2" H2PlugIn="True" H2PlugInNamespace="MS.VSCC,MS.VSCC.2003" LocaleID="0" ExcludeFiltersRegExp="False" OutputFileExtension=".html"> ! <OutputLocation OutputFolder="L:\release\Spring.Net\doc\sdk\Spring-1.1\net-1.1\web\" HelpFileName="L:\release\Spring.Net\doc\sdk\Spring-1.1\net-1.1\htmlhelp1and2\Spring.NET.hxs" UseFilenameAliases="True" StripMetadata="False" ClearBeforeBuild="True" RemoveOutputFilesAfterCompile="False"/> <HTMLHelpOptions UseALinkMenus="False"/> <OtherOptions CreateContextLinks="True" WriteHelpDescriptions="True" CopySourceCode="False" CreateWinHelpStub="False" Language="English"/> |
From: Mark P. <mar...@us...> - 2007-10-13 22:34:13
|
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5112 Modified Files: aop-aspect-library.xml Log Message: update docs logging docs for accuracy and additional description of other configurable properties. Index: aop-aspect-library.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/aop-aspect-library.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** aop-aspect-library.xml 11 Oct 2007 17:59:15 -0000 1.9 --- aop-aspect-library.xml 13 Oct 2007 22:34:10 -0000 1.10 *************** *** 468,477 **** <classname>SimpleLoggingAdvice</classname> progammatically.</para> ! <programlisting><object name="exceptionHandlingAdvice" type="Spring.Aspects.Logging.SimpleLoggingAdvice, Spring.Aop"> <property name="logUniqueIdentifier" value="true"/> <property name="logExecutionTime" value="true"/> <property name="logMethodArguments" value="true"/> <property name="Separator" value=";"/> ! <property name="LogLevel" value="LogLevel.Debug"/> </object></programlisting> --- 468,482 ---- <classname>SimpleLoggingAdvice</classname> progammatically.</para> ! <programlisting><object name="loggingAdvice" type="Spring.Aspects.Logging.SimpleLoggingAdvice, Spring.Aop"> <property name="logUniqueIdentifier" value="true"/> <property name="logExecutionTime" value="true"/> <property name="logMethodArguments" value="true"/> + <property name="Separator" value=";"/> ! <property name="LogLevel" value="Info"/> ! ! ! <property name="HideProxyTypeNames" value="true"/> ! <property name="UseDynamicLogger" value="true"/> </object></programlisting> *************** *** 480,484 **** default log level is Common.Logging's LogLevel.Trace.</para> ! <para>You can subclass SimpleLoggingAdvice and override the methods</para> <itemizedlist> --- 485,503 ---- default log level is Common.Logging's LogLevel.Trace.</para> ! <para>You can set the name of the logger with the property ! <property>LoggerName</property>, for example "DataAccessLayer" for a ! logging advice that would be applied across the all the classes in the ! data access layer. That works well when using a 'category' style of ! logging. If you do not set the <property>LoggerName</property> property, ! then the type name of the logging advice is used as the logging name. ! Another approach to logging is to log based on the type of the object ! being called, the target type. Since often this is a proxy class with a ! relatively meaningless name, the property ! <property>HideProxyTypeNames</property> can be set to true to show the ! true target type and not the proxy type.</para> ! ! <para>To futher extend the functionality of the ! <classname>SimpleLoggingAdvice</classname> you can subclass ! <classname>SimpleLoggingAdvice</classname> and override the methods</para> <itemizedlist> *************** *** 503,507 **** <para>The default implementation to calculate a unique identifer is to use a Guid. You can alter this behavior by overriding the method ! <literal>string CreateUniqueIdentifier()</literal>.</para> <para>As an example of the Logging advice's output, adding the advice to --- 522,534 ---- <para>The default implementation to calculate a unique identifer is to use a Guid. You can alter this behavior by overriding the method ! <literal>string CreateUniqueIdentifier()</literal>. The ! <classname>SimpleLoggingAdvice</classname> class inherits from ! <classname>AbstractLoggingAdvice</classname>, which has the abstract ! method <literal>object InvokeUnderLog(IMethodInvocation invocation, ILog ! log)</literal> and you can also override the method <literal>ILog ! GetLoggerForInvocation(IMethodInvocation invocation)</literal> to ! customize the logger instance used for logging. Refer to the SDK ! documentation for more details on subclassing ! <classname>AbstractLoggingAdvice</classname>.</para> <para>As an example of the Logging advice's output, adding the advice to *************** *** 524,527 **** --- 551,559 ---- some values in an array, override the method string GetMethodArgumentAsString(IMethodInvocation invocation).</para> + + <para>The Spring 1.2 release will have an additional logging advice + implementation the leverages the Spring Expression Language to further + customize the content of the logging messages via simple configuration + using similar syntax to the retry and exception handling advice.</para> </sect1> |
From: Mark P. <mar...@us...> - 2007-10-13 22:10:48
|
Update of /cvsroot/springnet/Spring.Net In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27897 Modified Files: BreakingChanges-1.1.txt Log Message: TxExample - fix exception advice dsl - was using old syntax, add logging advice in addition Add change in exception translation dsl to breaking changes. Index: BreakingChanges-1.1.txt =================================================================== RCS file: /cvsroot/springnet/Spring.Net/BreakingChanges-1.1.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** BreakingChanges-1.1.txt 23 Sep 2007 07:55:26 -0000 1.16 --- BreakingChanges-1.1.txt 13 Oct 2007 22:10:44 -0000 1.17 *************** *** 121,124 **** --- 121,134 ---- + Changes (M2 to RC1) + ----------------------------------- + + Spring.Aop + + 1. Changed DSL for exception handling. + Instead of "on ArithmeticException log 'Logging an exception thrown from method ' + #method.Name" + now use "on exception name ArithmeticException log 'Logging an exception thrown from method ' + #method.Name + Basically add the words 'exception name' after the word 'on' + |
From: Mark P. <mar...@us...> - 2007-10-13 22:10:48
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/test/Spring/Spring.TxQuickStart.Tests/TxQuickStart In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27897/examples/Spring/Spring.TxQuickStart/test/Spring/Spring.TxQuickStart.Tests/TxQuickStart Modified Files: DTCAppContext.xml Log Message: TxExample - fix exception advice dsl - was using old syntax, add logging advice in addition Add change in exception translation dsl to breaking changes. Index: DTCAppContext.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/test/Spring/Spring.TxQuickStart.Tests/TxQuickStart/DTCAppContext.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DTCAppContext.xml 9 Aug 2007 06:30:17 -0000 1.8 --- DTCAppContext.xml 13 Oct 2007 22:10:44 -0000 1.9 *************** *** 8,11 **** --- 8,15 ---- <!-- Available Catalogs: CreditsAndDebits, Credits, Debits --> + <!-- Step 1: Change to use CreditsAndDebits catalog --> + <!-- Step 2: Create alias and comment out CreditDbProvider --> + <!-- Step 3: Change tx manager AdoPlatformTransactionManager --> + <db:provider id="DebitDbProvider" provider="System.Data.SqlClient" *************** *** 16,19 **** --- 20,26 ---- connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Credits;User ID=springqa; Password=springqa"/> + <!-- + <alias name="DebitDbProvider" alias="CreditDbProvider"/> + --> <!-- Transaction Manager if using a single database that contain both credit and debit tables --> *************** *** 46,50 **** <property name="AccountCreditDao" ref="accountCreditDao"/> <property name="AccountDebitDao" ref="accountDebitDao"/> ! <property name="ThrowException" value="true"/> </object> --- 53,57 ---- <property name="AccountCreditDao" ref="accountCreditDao"/> <property name="AccountDebitDao" ref="accountDebitDao"/> ! <property name="ThrowException" value="false"/> </object> *************** *** 57,64 **** <property name="exceptionHandlers"> <list> ! <value>on ArithmeticException log 'Logging an exception thrown from method ' + #method.Name </value> </list> </property> </object> <object id="txAttributePointcut" type="Spring.Aop.Support.AttributeMatchMethodPointcut, Spring.Aop"> --- 64,82 ---- <property name="exceptionHandlers"> <list> ! <value>on exception name ArithmeticException log 'Logging an exception thrown from method ' + #method.Name </value> </list> </property> </object> + + <object name="loggingAdvice" type="Spring.Aspects.Logging.SimpleLoggingAdvice, Spring.Aop"> + <property name="logUniqueIdentifier" value="true"/> + <property name="logExecutionTime" value="true"/> + <property name="logMethodArguments" value="true"/> + <property name="Separator" value=";"/> + + <property name="HideProxyTypeNames" value="true"/> + <property name="UseDynamicLogger" value="true"/> + <property name="LogLevel" value="Info"/> + </object> <object id="txAttributePointcut" type="Spring.Aop.Support.AttributeMatchMethodPointcut, Spring.Aop"> *************** *** 72,75 **** --- 90,98 ---- advice-ref="exceptionAdvice" pointcut-ref="txAttributePointcut"/> + + <aop:advisor id="loggingAdvisor" order="2" + advice-ref="loggingAdvice" + pointcut-ref="txAttributePointcut"/> + </aop:config> |
From: Mark P. <mar...@us...> - 2007-10-13 22:10:48
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27897/test/Spring/Spring.Data.Integration.Tests/Data Modified Files: DTCAppContext.xml DTCTests.cs Log Message: TxExample - fix exception advice dsl - was using old syntax, add logging advice in addition Add change in exception translation dsl to breaking changes. Index: DTCTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/DTCTests.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DTCTests.cs 7 Aug 2007 21:24:03 -0000 1.6 --- DTCTests.cs 13 Oct 2007 22:10:44 -0000 1.7 *************** *** 24,27 **** --- 24,28 ---- using System.Collections.Specialized; using NUnit.Framework; + using Spring.Aop.Config; using Spring.Context; using Spring.Context.Support; *************** *** 47,50 **** --- 48,52 ---- LogManager.Adapter = new ConsoleOutLoggerFactoryAdapter(new NameValueCollection()); NamespaceParserRegistry.RegisterParser(typeof(TxNamespaceParser)); + NamespaceParserRegistry.RegisterParser(typeof(AopNamespaceParser)); string ctxName = "DTCAppContext.xml"; // for .NET 2.0 //string ctxName = "DTC1.1AppContext.xml"; // for .NET 1.1 Index: DTCAppContext.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/DTCAppContext.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DTCAppContext.xml 17 Sep 2007 19:18:50 -0000 1.7 --- DTCAppContext.xml 13 Oct 2007 22:10:44 -0000 1.8 *************** *** 2,6 **** <objects xmlns='http://www.springframework.net' xmlns:d="http://www.springframework.net/database" ! xmlns:tx="http://www.springframework.net/tx"> --- 2,7 ---- <objects xmlns='http://www.springframework.net' xmlns:d="http://www.springframework.net/database" ! xmlns:tx="http://www.springframework.net/tx" ! xmlns:aop="http://www.springframework.net/aop"> *************** *** 10,15 **** <d:provider id="DebitDbProvider" ! provider="SqlServer-2.0" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=CreditsAndDebits;Persist Security Info=True;User ID=springqa;Password=springqa"/> <!-- connectionString="Data Source=NYCSUMPOLLL\SQLEXPRESS;Initial Catalog=Debits;Integrated Security=True;Pooling=False"/> --- 11,16 ---- <d:provider id="DebitDbProvider" ! provider="SqlServer-2.0" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Debits;Persist Security Info=True;User ID=springqa;Password=springqa"/> <!-- connectionString="Data Source=NYCSUMPOLLL\SQLEXPRESS;Initial Catalog=Debits;Integrated Security=True;Pooling=False"/> *************** *** 18,22 **** <d:provider id="DbProvider" provider="SqlServer-2.0" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=CreditsAndDebits;Persist Security Info=True;User ID=springqa;Password=springqa"/> <!-- connectionString="Data Source=NYCSUMPOLLL\SQLEXPRESS;Initial Catalog=Credits;Integrated Security=True;Pooling=False"/> --- 19,23 ---- <d:provider id="DbProvider" provider="SqlServer-2.0" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Credits;Persist Security Info=True;User ID=springqa;Password=springqa"/> <!-- connectionString="Data Source=NYCSUMPOLLL\SQLEXPRESS;Initial Catalog=Credits;Integrated Security=True;Pooling=False"/> *************** *** 102,105 **** --- 103,131 ---- --> + <object name="loggingAdvice" type="Spring.Aspects.Logging.SimpleLoggingAdvice, Spring.Aop"> + <property name="logUniqueIdentifier" value="true"/> + <property name="logExecutionTime" value="true"/> + <property name="logMethodArguments" value="true"/> + <property name="Separator" value=";"/> + <!-- + <property name="LogLevel" value="Debug"/> + --> + </object> + + <object id="txAttributePointcut" type="Spring.Aop.Support.AttributeMatchMethodPointcut, Spring.Aop"> + <property name="Attribute" value="Spring.Transaction.Interceptor.TransactionAttribute, Spring.Data"/> + </object> + + <aop:config> + <!-- + <aop:advisor id="exceptionProcessAdvisor" order="1" + advice-ref="exceptionAdvice" + pointcut-ref="txAttributePointcut"/> + --> + + <aop:advisor id="loggingAdvisor" order="2" + advice-ref="loggingAdvice" + pointcut-ref="txAttributePointcut"/> + </aop:config> </objects> \ No newline at end of file |
From: Mark P. <mar...@us...> - 2007-10-13 22:00:34
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Interceptor In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23879 Modified Files: DelegatingTransactionAttributeWithName.cs Log Message: Silly bug fixed due to not implemented method to retrieve EnterpriseServicesInteorp enum. Index: DelegatingTransactionAttributeWithName.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Interceptor/DelegatingTransactionAttributeWithName.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DelegatingTransactionAttributeWithName.cs 7 Sep 2007 04:46:53 -0000 1.1 --- DelegatingTransactionAttributeWithName.cs 13 Oct 2007 22:00:29 -0000 1.2 *************** *** 154,158 **** public EnterpriseServicesInteropOption EnterpriseServicesInteropOption { ! get { throw new NotImplementedException(); } } #endif --- 154,158 ---- public EnterpriseServicesInteropOption EnterpriseServicesInteropOption { ! get { return targetAttribute.EnterpriseServicesInteropOption; } } #endif |