springnet-commits Mailing List for Spring Framework .NET (Page 24)
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-12-07 15:57:07
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23432 Modified Files: Spring.Data.2003.csproj Log Message: fix missing spring.aop ref. Index: Spring.Data.2003.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Spring.Data.2003.csproj,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Spring.Data.2003.csproj 7 Dec 2007 07:30:48 -0000 1.27 --- Spring.Data.2003.csproj 7 Dec 2007 15:57:04 -0000 1.28 *************** *** 100,103 **** --- 100,108 ---- Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" /> + <Reference + Name = "Spring.Aop.2003" + Project = "{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> </References> </Build> |
From: Bruno B. <bb...@us...> - 2007-12-07 15:44:59
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/Services In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18224 Modified Files: WebServiceExporterTests.cs Log Message: Allow web service base type to be configurable in WebServiceExporter. Added tests. Added tests for the same feature in WebServiceProxyFactory (already implementated). Index: WebServiceExporterTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/Services/WebServiceExporterTests.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** WebServiceExporterTests.cs 3 Dec 2007 09:08:07 -0000 1.5 --- WebServiceExporterTests.cs 7 Dec 2007 15:44:56 -0000 1.6 *************** *** 238,241 **** --- 238,253 ---- } + [Test] + public void UseCustomWebServiceType() + { + wse.ObjectName = "UseCustomWebServiceType"; + wse.TargetName = "noDecoratedService"; + wse.WebServiceType = typeof(CustomWebService); + wse.AfterPropertiesSet(); + + Type proxyType = wse.ObjectType; + Assert.IsTrue(typeof(CustomWebService).IsAssignableFrom(proxyType)); + } + #region Test classes *************** *** 263,266 **** --- 275,282 ---- } + public class CustomWebService : WebService + { + } + #endregion } |
From: Bruno B. <bb...@us...> - 2007-12-07 15:44:26
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Services.Tests/Web/Services In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18197 Modified Files: WebServiceProxyFactoryTests.cs Log Message: Allow web service base type to be configurable in WebServiceExporter. Added tests. Added tests for the same feature in WebServiceProxyFactory (already implementated). Index: WebServiceProxyFactoryTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Services.Tests/Web/Services/WebServiceProxyFactoryTests.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** WebServiceProxyFactoryTests.cs 7 Dec 2007 14:14:08 -0000 1.6 --- WebServiceProxyFactoryTests.cs 7 Dec 2007 15:44:23 -0000 1.7 *************** *** 434,437 **** --- 434,458 ---- } + [Test] + public void UseCustomClientProtocolType() + { + WebServiceProxyFactory wspf = new WebServiceProxyFactory(); + wspf.ServiceUri = new AssemblyResource("assembly://Spring.Services.Tests/Spring.Data.Spring.Web.Services/document-literal.wsdl"); + wspf.ServiceInterface = typeof(IHelloWorld); + wspf.ClientProtocolType = typeof(CustomClientProtocol); + wspf.AfterPropertiesSet(); + + object proxy = wspf.GetObject(); + Assert.IsNotNull(proxy); + + Type proxyType = proxy.GetType(); + Assert.IsTrue(proxy is IHelloWorld); + Assert.IsTrue(proxy is SoapHttpClientProtocol); + Assert.IsTrue(proxy is CustomClientProtocol); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); + } + #region NestedSchema *************** *** 556,559 **** --- 577,584 ---- } + public class CustomClientProtocol : SoapHttpClientProtocol + { + } + #endregion } |
From: Bruno B. <bb...@us...> - 2007-12-07 15:44:05
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Services In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17806 Modified Files: WebServiceExporter.cs Log Message: Allow web service base type to be configurable in WebServiceExporter. Added tests. Added tests for the same feature in WebServiceProxyFactory (already implementated). Index: WebServiceExporter.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Services/WebServiceExporter.cs,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** WebServiceExporter.cs 3 Dec 2007 09:07:43 -0000 1.27 --- WebServiceExporter.cs 7 Dec 2007 15:44:01 -0000 1.28 *************** *** 62,65 **** --- 62,66 ---- #region Fields + private Type webServiceType = typeof(WebService); private string _targetName; private string _description; *************** *** 91,94 **** --- 92,107 ---- /// <summary> + /// Gets or sets the base type that web service should inherit. + /// </summary> + /// <remarks> + /// Default is <see cref="System.Web.Services.WebService"/> + /// </remarks> + public Type WebServiceType + { + get { return webServiceType; } + set { webServiceType = value; } + } + + /// <summary> /// Gets or sets the name of the target object that should be exposed as a web service. /// </summary> *************** *** 230,234 **** /// this factory. /// </returns> ! public object GetObject() { // no sense to call this method, because the web service type --- 243,247 ---- /// this factory. /// </returns> ! public virtual object GetObject() { // no sense to call this method, because the web service type *************** *** 247,251 **** /// <see langword="null"/> if not known in advance. /// </summary> ! public Type ObjectType { get { return (proxyType != null ? proxyType : objectFactory.GetType(TargetName)); } --- 260,264 ---- /// <see langword="null"/> if not known in advance. /// </summary> ! public virtual Type ObjectType { get { return (proxyType != null ? proxyType : objectFactory.GetType(TargetName)); } *************** *** 255,259 **** /// Is the object managed by this factory a singleton or a prototype? /// </summary> ! public bool IsSingleton { get { return false; } --- 268,272 ---- /// Is the object managed by this factory a singleton or a prototype? /// </summary> ! public virtual bool IsSingleton { get { return false; } *************** *** 316,319 **** --- 329,333 ---- IProxyTypeBuilder builder = new WebServiceProxyTypeBuilder(TargetName, Description, Name, Namespace); builder.Name = this.objectName; + builder.BaseType = webServiceType; builder.TargetType = objectFactory.GetType(TargetName); if (Interfaces != null && Interfaces.Length > 0) *************** *** 355,361 **** // Creates a WebServiceAttribute from configuration info this.webServiceAttribute = CreateWebServiceAttribute(description, name, ns); - - // Optional - BaseType = typeof(WebService); } --- 369,372 ---- |
From: Bruno B. <bb...@us...> - 2007-12-07 15:43:51
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Services/Web/Services In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17785 Modified Files: WebServiceProxyFactory.cs Log Message: Allow web service base type to be configurable in WebServiceExporter. Added tests. Added tests for the same feature in WebServiceProxyFactory (already implementated). Index: WebServiceProxyFactory.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Services/Web/Services/WebServiceProxyFactory.cs,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** WebServiceProxyFactory.cs 7 Dec 2007 13:33:49 -0000 1.29 --- WebServiceProxyFactory.cs 7 Dec 2007 15:43:46 -0000 1.30 *************** *** 105,110 **** /// <summary> ! /// Gets or sets the BaseType that proxy should inherit. /// </summary> public Type ClientProtocolType { --- 105,113 ---- /// <summary> ! /// Gets or sets the base type that web service proxy should inherit. /// </summary> + /// <remarks> + /// Default is <see cref="System.Web.Services.Protocols.SoapHttpClientProtocol"/> + /// </remarks> public Type ClientProtocolType { |
From: Bruno B. <bb...@us...> - 2007-12-07 15:14:44
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Core/TypeConversion In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6004 Modified Files: CredentialConverter.cs Log Message: CredentialConverter docs/comments update. Index: CredentialConverter.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Core/TypeConversion/CredentialConverter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CredentialConverter.cs 31 Jul 2007 18:16:08 -0000 1.1 --- CredentialConverter.cs 7 Dec 2007 15:14:40 -0000 1.2 *************** *** 33,37 **** /// <summary> /// Converts string representation of a credential for Web client authentication ! /// into an instance of <see cref="System.Net.ICredentials"/>. /// </summary> /// <example> --- 33,37 ---- /// <summary> /// Converts string representation of a credential for Web client authentication ! /// into an instance of <see cref="System.Net.NetworkCredential"/>. /// </summary> /// <example> *************** *** 57,61 **** /// <summary> /// Can we convert from the sourcetype ! /// to a <see cref="System.Net.ICredentials"/> instance ? /// </summary> /// <remarks> --- 57,61 ---- /// <summary> /// Can we convert from the sourcetype ! /// to a <see cref="System.Net.NetworkCredential"/> instance ? /// </summary> /// <remarks> *************** *** 81,85 **** /// <summary> /// Convert from a <see cref="System.String"/> value to an ! /// <see cref="System.Net.ICredentials"/> instance. /// </summary> /// <param name="context"> --- 81,85 ---- /// <summary> /// Convert from a <see cref="System.String"/> value to an ! /// <see cref="System.Net.NetworkCredential"/> instance. /// </summary> /// <param name="context"> *************** *** 95,99 **** /// </param> /// <returns> ! /// A <see cref="System.Net.ICredentials"/> instance if successful. /// </returns> public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) --- 95,99 ---- /// </param> /// <returns> ! /// A <see cref="System.Net.NetworkCredential"/> instance if successful. /// </returns> public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) |
From: Bruno B. <bb...@us...> - 2007-12-07 15:13:48
|
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5586 Modified Files: objects.xml Log Message: CredentialConverter docs/comments update. Index: objects.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/objects.xml,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -d -r1.111 -r1.112 *** objects.xml 7 Dec 2007 07:32:36 -0000 1.111 --- objects.xml 7 Dec 2007 15:13:40 -0000 1.112 *************** *** 2611,2616 **** <entry>Capable of resolving a string representation of a ! credential for Web client authentication into an instance ! of<literal>System.Net.ICredentials</literal></entry> </row> --- 2611,2617 ---- <entry>Capable of resolving a string representation of a ! credential for Web client authentication into an instance ! of <literal>System.Net.ICredentials</literal> ! or <literal>System.Net.NetworkCredential</literal></entry> </row> |
From: Bruno B. <bb...@us...> - 2007-12-07 14:14:13
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Services.Tests/Web/Services In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14240 Modified Files: WebServiceProxyFactoryTests.cs Log Message: Added extra test to WebServiceProxyFactory. Index: WebServiceProxyFactoryTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Services.Tests/Web/Services/WebServiceProxyFactoryTests.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** WebServiceProxyFactoryTests.cs 8 Aug 2007 17:49:26 -0000 1.5 --- WebServiceProxyFactoryTests.cs 7 Dec 2007 14:14:08 -0000 1.6 *************** *** 37,40 **** --- 37,41 ---- using Spring.Context; using Spring.Context.Support; + using Spring.Util; #endregion *************** *** 96,99 **** --- 97,103 ---- Assert.AreEqual("http://www.springframwework.net", sdma.ResponseNamespace); Assert.AreEqual(SoapBindingUse.Literal, sdma.Use); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); } *************** *** 129,132 **** --- 133,139 ---- Assert.AreEqual(null, sdma.ResponseNamespace); Assert.AreEqual(SoapBindingUse.Literal, sdma.Use); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); } *************** *** 162,165 **** --- 169,175 ---- Assert.AreEqual("http://www.springframwework.net", sdma.ResponseNamespace); Assert.AreEqual(SoapBindingUse.Literal, sdma.Use); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); } *************** *** 202,205 **** --- 212,218 ---- XmlElementAttribute xea = (XmlElementAttribute)xeAttrs[0]; Assert.AreEqual("out", xea.ElementName); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); } *************** *** 240,243 **** --- 253,259 ---- XmlElementAttribute xea = (XmlElementAttribute)xeAttrs[0]; Assert.AreEqual("out", xea.ElementName); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); } *************** *** 279,282 **** --- 295,301 ---- Assert.AreEqual("http://www.springframwework.net", srma.ResponseNamespace); Assert.AreEqual(SoapBindingUse.Literal, srma.Use); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); } *************** *** 311,314 **** --- 330,336 ---- Assert.AreEqual(null, srma.ResponseNamespace); Assert.AreEqual(SoapBindingUse.Literal, srma.Use); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); } *************** *** 343,346 **** --- 365,371 ---- Assert.AreEqual("http://www.springframwework.net", srma.ResponseNamespace); Assert.AreEqual(SoapBindingUse.Literal, srma.Use); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); } #endif *************** *** 360,363 **** --- 385,391 ---- Assert.IsTrue(proxy is IHelloWorld); Assert.IsTrue(proxy is SoapHttpClientProtocol); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); } *************** *** 379,382 **** --- 407,413 ---- Assert.AreEqual("http://www.springframework.org/", shcp.Url); Assert.AreEqual(10000, shcp.Timeout); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); } *************** *** 398,401 **** --- 429,435 ---- Assert.AreEqual("http://www.springframework.org/", shcp.Url); Assert.AreEqual(10000, shcp.Timeout); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); } *************** *** 417,420 **** --- 451,457 ---- Assert.IsTrue(proxy is INestedSchema); Assert.IsTrue(proxy is SoapHttpClientProtocol); + + // Try to instantiate the proxy type + ObjectUtils.InstantiateType(proxyType); } |
From: Bruno B. <bb...@us...> - 2007-12-07 13:34:02
|
Update of /cvsroot/springnet/Spring.Net In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30391 Modified Files: changelog.txt Log Message: WebServiceProxyFactory support for SoapHeaderAttribute [SPRNET-784] Revert changes - Moved to 1.1.1 Index: changelog.txt =================================================================== RCS file: /cvsroot/springnet/Spring.Net/changelog.txt,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** changelog.txt 7 Dec 2007 08:12:39 -0000 1.30 --- changelog.txt 7 Dec 2007 13:33:49 -0000 1.31 *************** *** 32,36 **** [SPRNET-768] - Add support for ODBC provider [SPRNET-774] - Add Designmode support for DataBindingPanel - [SPRNET-784] - WebServiceProxyFactory support for SoapHeaderAttribute with Direction=SoapHeaderDirection.In [SPRNET-793] - Add Execute methods missing in Generic.AdoTemplate but present in non-generic version. [SPRNET-797] - Make it such that DefaultTransactionStatus property Rollback can only be set to true --- 32,35 ---- |
From: Bruno B. <bb...@us...> - 2007-12-07 13:33:55
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Services/Web/Services In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30391/src/Spring/Spring.Services/Web/Services Modified Files: WebServiceProxyFactory.cs Log Message: WebServiceProxyFactory support for SoapHeaderAttribute [SPRNET-784] Revert changes - Moved to 1.1.1 Index: WebServiceProxyFactory.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Services/Web/Services/WebServiceProxyFactory.cs,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** WebServiceProxyFactory.cs 3 Dec 2007 09:07:31 -0000 1.28 --- WebServiceProxyFactory.cs 7 Dec 2007 13:33:49 -0000 1.29 *************** *** 437,442 **** #region Fields - private ArrayList soapHeaderFieldNames; - // Binding/Type related private IResource serviceUri; --- 437,440 ---- *************** *** 468,472 **** { this.serviceUri = serviceUri; - this.soapHeaderFieldNames = new ArrayList(); Name = "SoapHttpClientProxy"; --- 466,469 ---- *************** *** 508,517 **** } - // add SoapHeader public fields - foreach (string fieldName in soapHeaderFieldNames) - { - typeBuilder.DefineField(fieldName, typeof(SoapHeader), FieldAttributes.Public); - } - return typeBuilder.CreateType(); } --- 505,508 ---- *************** *** 584,594 **** IList attrs = base.GetMethodAttributes(method); - // Add the SoapHeaderAttribute (Only SoapHeaders with Direction=SoapHeaderDirection.In are supported) - foreach (SoapHeaderBinding soapHeaderBinding in operationBinding.Input.Extensions.FindAll(typeof(SoapHeaderBinding))) - { - soapHeaderFieldNames.Add(soapHeaderBinding.Part); - attrs.Add(CreateSoapHeaderAttribute(soapHeaderBinding.Part, SoapHeaderDirection.In)); - } - // Add the SoapMethodAttribute attrs.Add(CreateSoapMethodAttribute( --- 575,578 ---- *************** *** 874,892 **** /// <summary> - /// Creates a <see cref="SoapHeaderAttribute"/> that should be applied to proxy method. - /// </summary> - private static CustomAttributeBuilder CreateSoapHeaderAttribute( - string memberName, SoapHeaderDirection direction) - { - ReflectionUtils.CustomAttributeBuilderBuilder cabb = - new ReflectionUtils.CustomAttributeBuilderBuilder(typeof(SoapHeaderAttribute)); - - cabb.AddContructorArgument(memberName); - cabb.AddPropertyValue("Direction", direction); - - return cabb.Build(); - } - - /// <summary> /// Creates a <see cref="SoapDocumentMethodAttribute"/> or a <see cref="SoapRpcMethodAttribute"/> /// that should be applied to proxy method. --- 858,861 ---- |
From: Mark P. <mar...@us...> - 2007-12-07 08:12:42
|
Update of /cvsroot/springnet/Spring.Net In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26940 Modified Files: changelog.txt Log Message: Index: changelog.txt =================================================================== RCS file: /cvsroot/springnet/Spring.Net/changelog.txt,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** changelog.txt 6 Dec 2007 06:42:00 -0000 1.29 --- changelog.txt 7 Dec 2007 08:12:39 -0000 1.30 *************** *** 7,11 **** Bug - [SPRNET-394] - Recursive calls to Context.GetRegistry() [SPRNET-448] - TransactionTimeout setting not being applied correctly. [SPRNET-453] - ConversionUtils should use ConvertFromInvariantString if failed to convert string value. --- 7,10 ---- *************** *** 21,24 **** --- 20,25 ---- [SPRNET-778] - AdoExceptionTranslator in HibernateTransactionManager did not have a default value [SPRNET-796] - AdoTemplate not using DbMetadata for CommandBuilderDeriveParamtersMethod + [SPRNET-800] - SimpleLoggingAdvice does not correctly check for logging level other than trace. + [SPRNET-802] - Default IsolationLevel should be ReadCommitted. Improvement *************** *** 26,30 **** [SPRNET-497] - Print 'resultName's value if Page.SetResult() is called with a non-existant result name [SPRNET-514] - dbproviders.xml configuration should allow for an optional 'DeriveParameters' method. - [SPRNET-540] - Warning for ProxyTargetType pitfall [SPRNET-555] - Improve ResourceSetMessageSource documentation and add example for ASP.NET 2.0 [SPRNET-756] - Add protected method to ErrorCodeExceptionTranslator to allow for a subclass to first attempt exception translation. --- 27,30 ---- *************** *** 39,44 **** [SPRNET-203] - Add test coverage for Spring.Net Web module - [SPRNET-217] - QuickStart documents for Spring.Air - [SPRNET-401] - Show use case of strategy/command pattern usage to create/set objects parameters at runtime. [SPRNET-421] - Document programmatic use of data validation framework [SPRNET-457] - Investigate AdoTemplate behavior when contraint is violated. --- 39,42 ---- *************** *** 46,55 **** [SPRNET-516] - Improve documentation on Spring.Data DataSet functionality [SPRNET-574] - NHibernate and custom loader - [SPRNET-587] - Add example of validation usage in middle tier services [SPRNET-590] - Include use of Spring's implementation of NHibernate's ICurrentSessionContext in demo appliation. [SPRNET-609] - AOP documentation should describe in detail differences using ProxyTargetType value on ProxyFactoryObject - [SPRNET-610] - AOP documentation improvements [SPRNET-682] - Change vs.net 2002 solution to be Spring.Net.1.1.2002.sln - [SPRNET-689] - Add more documentation describing ITransactionAttributeSource implementations. [SPRNET-708] - Remove "UniqueID" based usercontrol DI sample from web reference docs [SPRNET-726] - Improve Spring.Data.NHibernate docs w.r.t FlushMode.Never in OSIV --- 44,50 ---- *************** *** 57,61 **** [SPRNET-764] - NUnit 2.4.3 GUI-runner not executing Spring.Testing.NUnit based tests linked to NUnit 2.4.1. [SPRNET-773] - Unit tests for ServiceDomainTransactionManager - [SPRNET-775] - Document using a custom IFactoryObject to help with configuring embedded resources [SPRNET-776] - Unit tests for AdoPlatformTransactionManager [SPRNET-777] - Provide 10,000 ft intro page on spring.net features on web site --- 52,55 ---- *************** *** 64,68 **** [SPRNET-787] - add examples for DataBindingPanel to WebQuickStart [SPRNET-788] - integrate Spring.Web.Tests with NUnitAspEx to support real HttpRuntime-integrated tests ! Release 1.1 RC2, October 15, 2007 --- 58,62 ---- [SPRNET-787] - add examples for DataBindingPanel to WebQuickStart [SPRNET-788] - integrate Spring.Web.Tests with NUnitAspEx to support real HttpRuntime-integrated tests ! [SPRNET-798] - Add overview documentation from web site into reference docs Release 1.1 RC2, October 15, 2007 |
From: Mark P. <mar...@us...> - 2007-12-07 08:10:09
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Interceptor In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25747/Interceptor Modified Files: TransactionAspectSupport.cs TransactionAttributeSourceAdvisor.cs Log Message: adding code comments... Index: TransactionAspectSupport.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAspectSupport.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** TransactionAspectSupport.cs 7 Sep 2007 04:46:53 -0000 1.13 --- TransactionAspectSupport.cs 7 Dec 2007 08:10:03 -0000 1.14 *************** *** 150,153 **** --- 150,157 ---- } + /// <summary> + /// Gets the joinpoint identification. + /// </summary> + /// <value>The joinpoint identification.</value> public string JoinpointIdentification { *************** *** 165,168 **** --- 169,175 ---- + /// <summary> + /// The name in thread local storage where the TransactionInfo object is located + /// </summary> public const string CURRENT_TRANSACTIONINFO_SLOTNAME = "TransactionAspectSupport.CurrentTransactionInfoSlotName"; *************** *** 323,326 **** --- 330,339 ---- } + /// <summary> + /// Creates the transaction if necessary. + /// </summary> + /// <param name="sourceAttr">The source transaction attribute.</param> + /// <param name="joinpointIdentification">The joinpoint identification.</param> + /// <returns>Transaction Info for declarative transaction management.</returns> protected TransactionInfo CreateTransactionIfNecessary(ITransactionAttribute sourceAttr, string joinpointIdentification) { *************** *** 366,369 **** --- 379,387 ---- } + /// <summary> + /// Identifies the method by providing the qualfied method name. + /// </summary> + /// <param name="methodInfo">The method info.</param> + /// <returns>qualified mehtod name.</returns> protected string MethodIdentification(MethodInfo methodInfo) { Index: TransactionAttributeSourceAdvisor.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeSourceAdvisor.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** TransactionAttributeSourceAdvisor.cs 18 Jun 2007 20:06:32 -0000 1.10 --- TransactionAttributeSourceAdvisor.cs 7 Dec 2007 08:10:03 -0000 1.11 *************** *** 113,116 **** --- 113,120 ---- } + /// <summary> + /// Sets the tx attribute source. + /// </summary> + /// <param name="transactionInterceptor">The transaction interceptor.</param> protected void SetTxAttributeSource(TransactionInterceptor transactionInterceptor) { |
From: Mark P. <mar...@us...> - 2007-12-07 08:10:09
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Config In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25747/Config Modified Files: AttributeDrivenObjectDefinitionParser.cs TxNamespaceUtils.cs Log Message: adding code comments... Index: AttributeDrivenObjectDefinitionParser.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Config/AttributeDrivenObjectDefinitionParser.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AttributeDrivenObjectDefinitionParser.cs 29 Jun 2007 00:09:38 -0000 1.6 --- AttributeDrivenObjectDefinitionParser.cs 7 Dec 2007 08:10:03 -0000 1.7 *************** *** 53,56 **** --- 53,66 ---- private static readonly string ORDER = "order"; + /// <summary> + /// Central template method to actually parse the supplied XmlElement + /// into one or more IObjectDefinitions. + /// </summary> + /// <param name="element">The element that is to be parsed into one or more <see cref="IObjectDefinition"/>s</param> + /// <param name="parserContext">The the object encapsulating the current state of the parsing process; + /// provides access to a <see cref="IObjectDefinitionRegistry"/></param> + /// <returns> + /// The primary IObjectDefinition resulting from the parsing of the supplied XmlElement + /// </returns> protected override AbstractObjectDefinition ParseInternal(XmlElement element, ParserContext parserContext) { *************** *** 78,81 **** --- 88,96 ---- } + /// <summary> + /// Configures the auto proxy creator. + /// </summary> + /// <param name="parserContext">The parser context.</param> + /// <param name="element">The element.</param> private static void ConfigureAutoProxyCreator(ParserContext parserContext, XmlElement element) { Index: TxNamespaceUtils.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Config/TxNamespaceUtils.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TxNamespaceUtils.cs 18 Jun 2007 10:31:19 -0000 1.1 --- TxNamespaceUtils.cs 7 Dec 2007 08:10:03 -0000 1.2 *************** *** 26,42 **** { /// <summary> ! /// This is /// </summary> - /// <remarks> - /// - /// </remarks> /// <author>Mark Pollack</author> /// <version>$Id$</version> public sealed class TxNamespaceUtils { public const string TRANSACTION_MANAGER_ATTRIBUTE = "transaction-manager"; public const string TRANSACTION_ATTRIBUTE_SOURCE = "transactionAttributeSource"; public static readonly string TRANSACTION_MANAGER_PROPERTY = Conventions.AttributeNameToPropertyName(TRANSACTION_MANAGER_ATTRIBUTE); --- 26,48 ---- { /// <summary> ! /// This is a utility class to help in parsing the transaction namespace /// </summary> /// <author>Mark Pollack</author> /// <version>$Id$</version> public sealed class TxNamespaceUtils { + /// <summary> + /// The transaction manager attribute + /// </summary> public const string TRANSACTION_MANAGER_ATTRIBUTE = "transaction-manager"; + /// <summary> + /// The source of transaction metadata + /// </summary> public const string TRANSACTION_ATTRIBUTE_SOURCE = "transactionAttributeSource"; + /// <summary> + /// The property asociated with the transaction manager xml element + /// </summary> public static readonly string TRANSACTION_MANAGER_PROPERTY = Conventions.AttributeNameToPropertyName(TRANSACTION_MANAGER_ATTRIBUTE); |
From: Mark P. <mar...@us...> - 2007-12-07 08:10:09
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25747/Support Modified Files: DefaultTransactionDefinition.cs Log Message: adding code comments... Index: DefaultTransactionDefinition.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Support/DefaultTransactionDefinition.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** DefaultTransactionDefinition.cs 7 Dec 2007 07:30:48 -0000 1.14 --- DefaultTransactionDefinition.cs 7 Dec 2007 08:10:03 -0000 1.15 *************** *** 207,210 **** --- 207,214 ---- #if NET_2_0 + /// <summary> + /// Gets the enterprise services interop option. + /// </summary> + /// <value>The enterprise services interop option.</value> public System.Transactions.EnterpriseServicesInteropOption EnterpriseServicesInteropOption { |
From: Mark P. <mar...@us...> - 2007-12-07 08:10:09
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25747 Modified Files: ITransactionDefinition.cs Log Message: adding code comments... Index: ITransactionDefinition.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/ITransactionDefinition.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ITransactionDefinition.cs 8 Aug 2007 20:59:50 -0000 1.8 --- ITransactionDefinition.cs 7 Dec 2007 08:10:03 -0000 1.9 *************** *** 113,116 **** --- 113,120 ---- #if NET_2_0 + /// <summary> + /// Gets the enterprise services interop option. + /// </summary> + /// <value>The enterprise services interop option.</value> System.Transactions.EnterpriseServicesInteropOption EnterpriseServicesInteropOption { get;} #endif |
From: Mark P. <mar...@us...> - 2007-12-07 08:09:56
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25689/Support Modified Files: ConnectionSynchronization.cs Log Message: adding code comments... Index: ConnectionSynchronization.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Support/ConnectionSynchronization.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ConnectionSynchronization.cs 6 Dec 2006 00:02:23 -0000 1.4 --- ConnectionSynchronization.cs 7 Dec 2007 08:09:52 -0000 1.5 *************** *** 28,33 **** order = ConnectionUtils.CONNECTION_SYNCHRONIZATION_ORDER; } ! ! public override int CompareTo(object obj) { --- 28,40 ---- order = ConnectionUtils.CONNECTION_SYNCHRONIZATION_ORDER; } ! ! ! /// <summary> ! /// Compares the current instance with another object of the same type. ! /// </summary> ! /// <param name="obj">An object to compare with this instance.</param> ! /// <returns> ! /// The value of the order property. ! /// </returns> public override int CompareTo(object obj) { |
From: Mark P. <mar...@us...> - 2007-12-07 08:09:56
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25689/Common Modified Files: DbProvider.cs MultiDelegatingDbProvider.cs Log Message: adding code comments... Index: MultiDelegatingDbProvider.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/MultiDelegatingDbProvider.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MultiDelegatingDbProvider.cs 6 Dec 2007 05:48:27 -0000 1.2 --- MultiDelegatingDbProvider.cs 7 Dec 2007 08:09:52 -0000 1.3 *************** *** 77,86 **** if (! entry.Key.GetType().Equals(typeof(string))) { ! throw new ArgumentException("Key identifying target IDbProvider in TargetDbProviders dictionary property is required to be of type string. Key = " + entry.Key.ToString()); } IDbProvider targetProvider = entry.Value as IDbProvider; if (targetProvider == null) { ! throw new ArgumentException("Value in TargetDbProviders dictionary is not of type IDbProvider. Value = " + targetProvider.ToString()); } } --- 77,86 ---- if (! entry.Key.GetType().Equals(typeof(string))) { ! throw new ArgumentException("Key identifying target IDbProvider in TargetDbProviders dictionary property is required to be of type string. Key = " + entry.Key); } IDbProvider targetProvider = entry.Value as IDbProvider; if (targetProvider == null) { ! throw new ArgumentException("Value in TargetDbProviders dictionary is not of type IDbProvider."); } } *************** *** 90,93 **** --- 90,98 ---- + /// <summary> + /// Returns a new command object for executing SQL statments/Stored Procedures + /// against the database. + /// </summary> + /// <returns>An new <see cref="IDbCommand"/></returns> public IDbCommand CreateCommand() { *************** *** 95,98 **** --- 100,107 ---- } + /// <summary> + /// Returns a new connection object to communicate with the database. + /// </summary> + /// <returns>A new <see cref="IDbConnection"/></returns> public IDbConnection CreateConnection() { *************** *** 100,103 **** --- 109,117 ---- } + /// <summary> + /// Returns a new parameter object for binding values to parameter + /// placeholders in SQL statements or Stored Procedure variables. + /// </summary> + /// <returns>A new <see cref="IDbDataParameter"/></returns> public IDbDataParameter CreateParameter() { *************** *** 105,108 **** --- 119,126 ---- } + /// <summary> + /// Returns a new adapter objects for use with offline DataSets. + /// </summary> + /// <returns>A new <see cref="IDbDataAdapter"/></returns> public IDbDataAdapter CreateDataAdapter() { *************** *** 110,113 **** --- 128,138 ---- } + /// <summary> + /// Returns a new instance of the providers CommandBuilder class. + /// </summary> + /// <returns>A new Command Builder</returns> + /// <remarks>In .NET 1.1 there was no common base class or interface + /// for command builders, hence the return signature is object to + /// be portable (but more loosely typed) across .NET 1.1/2.0</remarks> public object CreateCommandBuilder() { *************** *** 115,118 **** --- 140,151 ---- } + /// <summary> + /// Creates the name of the parameter in the format appropriate to use inside IDbCommand.CommandText. + /// </summary> + /// <param name="name">The unformatted name of the parameter.</param> + /// <returns> + /// The parameter name formatted foran IDbCommand.CommandText. + /// </returns> + /// <remarks>In most cases this adds the parameter prefix to the name passed into this method.</remarks> public string CreateParameterName(string name) { *************** *** 121,124 **** --- 154,165 ---- + /// <summary> + /// Creates the name ofthe parameter in the format appropriate for an IDataParameter, i.e. to be + /// part of a IDataParameterCollection. + /// </summary> + /// <param name="name">The unformatted name of the parameter.</param> + /// <returns> + /// The parameter name formatted for an IDataParameter + /// </returns> public string CreateParameterNameForCollection(string name) { *************** *** 126,129 **** --- 167,174 ---- } + /// <summary> + /// Return metadata information about the database provider + /// </summary> + /// <value></value> public IDbMetadata DbMetadata { *************** *** 131,134 **** --- 176,183 ---- } + /// <summary> + /// Connection string used to create connections. + /// </summary> + /// <value></value> public string ConnectionString { *************** *** 137,140 **** --- 186,194 ---- } + /// <summary> + /// Extracts the provider specific error code as a string. + /// </summary> + /// <param name="e">The data access exception.</param> + /// <returns>The provider specific error code</returns> public string ExtractError(Exception e) { *************** *** 142,145 **** --- 196,210 ---- } + /// <summary> + /// Determines whether the provided exception is in fact related + /// to database access. This can be provider dependent in .NET 1.1 since + /// there isn't a common base class for ADO.NET exceptions. + /// </summary> + /// <param name="e">The exception thrown when performing data access + /// operations.</param> + /// <returns> + /// <c>true</c> if is a valid data access exception for the specified + /// exception; otherwise, <c>false</c>. + /// </returns> public bool IsDataAccessException(Exception e) { *************** *** 157,161 **** #endif } ! public bool IsDataAccessExceptionBCL11(Exception e) { --- 222,233 ---- #endif } ! ! /// <summary> ! /// Determines whether is data access exception in .NET 1.1 for the specified exception. ! /// </summary> ! /// <param name="e">The candidate exception.</param> ! /// <returns> ! /// <c>true</c> if is data access exception in .NET 1.1 for the specified exception; otherwise, <c>false</c>. ! /// </returns> public bool IsDataAccessExceptionBCL11(Exception e) { Index: DbProvider.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/DbProvider.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** DbProvider.cs 6 Dec 2007 05:48:27 -0000 1.13 --- DbProvider.cs 7 Dec 2007 08:09:52 -0000 1.14 *************** *** 26,29 **** --- 26,32 ---- namespace Spring.Data.Common { + /// <summary> + /// Implemenation of of DbProvider that uses metadata to create provider specific ADO.NET objects. + /// </summary> public class DbProvider : IDbProvider { *************** *** 39,43 **** this.dbMetadata = dbMetadata; } ! public IDbCommand CreateCommand() { --- 42,51 ---- this.dbMetadata = dbMetadata; } ! ! /// <summary> ! /// Returns a new command object for executing SQL statments/Stored Procedures ! /// against the database. ! /// </summary> ! /// <returns>An new <see cref="IDbCommand"/></returns> public IDbCommand CreateCommand() { *************** *** 45,48 **** --- 53,63 ---- } + /// <summary> + /// Returns a new instance of the providers CommandBuilder class. + /// </summary> + /// <returns>A new Command Builder</returns> + /// <remarks>In .NET 1.1 there was no common base class or interface + /// for command builders, hence the return signature is object to + /// be portable (but more loosely typed) across .NET 1.1/2.0</remarks> public object CreateCommandBuilder() { *************** *** 50,53 **** --- 65,72 ---- } + /// <summary> + /// Returns a new connection object to communicate with the database. + /// </summary> + /// <returns>A new <see cref="IDbConnection"/></returns> public IDbConnection CreateConnection() { *************** *** 55,62 **** //TODO use .NET 2.0 factory class if on 2.0 IDbConnection conn = ObjectUtils.InstantiateType(dbMetadata.ConnectionType) as IDbConnection; ! conn.ConnectionString = ConnectionString; return conn; } public IDbDataAdapter CreateDataAdapter() { --- 74,88 ---- //TODO use .NET 2.0 factory class if on 2.0 IDbConnection conn = ObjectUtils.InstantiateType(dbMetadata.ConnectionType) as IDbConnection; ! if (conn != null) ! { ! conn.ConnectionString = ConnectionString; ! } return conn; } + /// <summary> + /// Returns a new adapter objects for use with offline DataSets. + /// </summary> + /// <returns>A new <see cref="IDbDataAdapter"/></returns> public IDbDataAdapter CreateDataAdapter() { *************** *** 64,67 **** --- 90,98 ---- } + /// <summary> + /// Returns a new parameter object for binding values to parameter + /// placeholders in SQL statements or Stored Procedure variables. + /// </summary> + /// <returns>A new <see cref="IDbDataParameter"/></returns> public IDbDataParameter CreateParameter() { *************** *** 69,72 **** --- 100,111 ---- } + /// <summary> + /// Creates the name of the parameter in the format appropriate to use inside IDbCommand.CommandText. + /// </summary> + /// <param name="name">The unformatted name of the parameter.</param> + /// <returns> + /// The parameter name formatted foran IDbCommand.CommandText. + /// </returns> + /// <remarks>In most cases this adds the parameter prefix to the name passed into this method.</remarks> public string CreateParameterName(string name) { *************** *** 88,91 **** --- 127,138 ---- } + /// <summary> + /// Creates the name ofthe parameter in the format appropriate for an IDataParameter, i.e. to be + /// part of a IDataParameterCollection. + /// </summary> + /// <param name="name">The unformatted name of the parameter.</param> + /// <returns> + /// The parameter name formatted for an IDataParameter + /// </returns> public string CreateParameterNameForCollection(string name) { *************** *** 107,110 **** --- 154,161 ---- } + /// <summary> + /// Return metadata information about the database provider + /// </summary> + /// <value></value> public IDbMetadata DbMetadata { *************** *** 112,115 **** --- 163,170 ---- } + /// <summary> + /// Connection string used to create connections. + /// </summary> + /// <value></value> public string ConnectionString { *************** *** 118,121 **** --- 173,181 ---- } + /// <summary> + /// Extracts the provider specific error code as a string. + /// </summary> + /// <param name="e">The data access exception.</param> + /// <returns>The provider specific error code</returns> public string ExtractError(Exception e) { *************** *** 131,137 **** } - - public bool IsDataAccessException(Exception e) { --- 191,208 ---- } + + + /// <summary> + /// Determines whether the provided exception is in fact related + /// to database access. This can be provider dependent in .NET 1.1 since + /// there isn't a common base class for ADO.NET exceptions. + /// </summary> + /// <param name="e">The exception thrown when performing data access + /// operations.</param> + /// <returns> + /// <c>true</c> if is a valid data access exception for the specified + /// exception; otherwise, <c>false</c>. + /// </returns> public bool IsDataAccessException(Exception e) { *************** *** 150,154 **** #endif } ! private bool IsDataAccessExceptionBCL11(Exception e) { --- 221,232 ---- #endif } ! ! /// <summary> ! /// Determines whether is data access exception in .NET 1.1 for the specified exception. ! /// </summary> ! /// <param name="e">The candidate exception.</param> ! /// <returns> ! /// <c>true</c> if is data access exception in .NET 1.1 for the specified exception; otherwise, <c>false</c>. ! /// </returns> private bool IsDataAccessExceptionBCL11(Exception e) { |
From: Mark P. <mar...@us...> - 2007-12-07 08:09:55
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Objects In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25689/Objects Modified Files: AdoOperation.cs Log Message: adding code comments... Index: AdoOperation.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Objects/AdoOperation.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** AdoOperation.cs 3 Aug 2007 19:51:10 -0000 1.13 --- AdoOperation.cs 7 Dec 2007 08:09:52 -0000 1.14 *************** *** 95,99 **** #region Properties ! public AdoTemplate AdoTemplate { --- 95,103 ---- #region Properties ! ! /// <summary> ! /// Gets or sets the ADO template. ! /// </summary> ! /// <value>The ADO template.</value> public AdoTemplate AdoTemplate { *************** *** 111,116 **** } } - public override IDbProvider DbProvider { --- 115,124 ---- } } + + /// <summary> + /// Gets or sets the db provider. + /// </summary> + /// <value>The db provider.</value> public override IDbProvider DbProvider { |
From: Mark P. <mar...@us...> - 2007-12-07 08:09:55
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25689 Modified Files: IDbDataAdapterCreator.cs InvalidResultSetAccessException.cs Log Message: adding code comments... Index: IDbDataAdapterCreator.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/IDbDataAdapterCreator.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IDbDataAdapterCreator.cs 29 Nov 2006 07:18:45 -0000 1.2 --- IDbDataAdapterCreator.cs 7 Dec 2007 08:09:52 -0000 1.3 *************** *** 41,44 **** --- 41,48 ---- public interface IDbDataAdapterCreator { + /// <summary> + /// Creates the data adapter. + /// </summary> + /// <returns>A new IDbDataAdapter instance</returns> IDbDataAdapter CreateDataAdapter(); } Index: InvalidResultSetAccessException.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/InvalidResultSetAccessException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InvalidResultSetAccessException.cs 12 Jun 2006 10:39:19 -0000 1.1 --- InvalidResultSetAccessException.cs 7 Dec 2007 08:09:52 -0000 1.2 *************** *** 102,105 **** --- 102,109 ---- #region Properties + /// <summary> + /// Gets the SQL that caused the exception + /// </summary> + /// <value>The SQL that caused the exception.</value> public string Sql { |
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11266 Modified Files: aop.xml objects.xml remoting-quickstart.xml transaction.xml tx-quickstart.xml web.xml webservices.xml Log Message: remove various todo placeholders update txquickstart docs Index: webservices.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/webservices.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** webservices.xml 15 Oct 2007 23:32:33 -0000 1.12 --- webservices.xml 7 Dec 2007 07:32:36 -0000 1.13 *************** *** 330,335 **** while applying any configured AOP advice.</para> - <!-- TODO: insert a diagram showing the call chain here --> - <para>Effecting this setup is actually fairly straightforward; because an AOP proxy is an object just like any other object, all you need to do --- 330,333 ---- Index: transaction.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/transaction.xml,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** transaction.xml 28 Nov 2007 05:54:37 -0000 1.22 --- transaction.xml 7 Dec 2007 07:32:36 -0000 1.23 *************** *** 379,385 **** <title>Low-level approach</title> ! <para>TODO. A utility class can be used to directly obtain a connection/transaction pair that is aware of the transactional calling ! context and returns and pair suitable for that context.</para> </sect2> </sect1> --- 379,388 ---- <title>Low-level approach</title> ! <para>A utility class can be used to directly obtain a connection/transaction pair that is aware of the transactional calling ! context and returns and pair suitable for that context. The class ! ConnectionUtils contains the static method ConnectionTxPair ! GetConnectionTxPair(IDbProvider provider) which serves this ! purpose.</para> </sect2> </sect1> *************** *** 1726,1730 **** alternatively throw an exception. This is shown below</para> ! <programlisting>TODO</programlisting> <para>If you are using .NET 1.1 then you should provide a normal --- 1729,1739 ---- alternatively throw an exception. This is shown below</para> ! <programlisting>tt.Execute(delegate(ITransactionStatus status) ! { ! adoTemplate.ExecuteNonQuery(CommandType.Text, "insert into dbo.Debits (DebitAmount) VALUES (@amount)", "amount", DbType.Decimal, 0,555); ! // decide you need to rollback... ! status.RollbackOnly = true; ! return null; ! });</programlisting> <para>If you are using .NET 1.1 then you should provide a normal *************** *** 1733,1737 **** shown below</para> ! <programlisting>TODO</programlisting> <para>Application classes wishing to use the --- 1742,1765 ---- shown below</para> ! <programlisting>tt.Execute(new TransactionRollbackTxCallback(amount)); ! ! ! public class TransactionRollbackTxCallback : ITransactionCallback ! { ! private decimal amount; ! ! public TransactionRollbackTxCallback(decimal amount) ! { ! this.amount = amount ! } ! ! public object DoInTransaction(ITransactionStatus status) ! { ! adoTemplate.ExecuteNonQuery(CommandType.Text, "insert into dbo.Debits (DebitAmount) VALUES (@amount)", "amount", DbType.Decimal, 0,555); ! // decide you need to rollback... ! status.RollbackOnly = true; ! return null; ! } ! }</programlisting> <para>Application classes wishing to use the *************** *** 1770,1774 **** <para>Note that a corresponding 'using TransactionManagerScope' class can be modeled to get similar API usage to System.Transactions ! TransactionScope. This will be done in a future release.</para> </sect2> </sect1> --- 1798,1802 ---- <para>Note that a corresponding 'using TransactionManagerScope' class can be modeled to get similar API usage to System.Transactions ! TransactionScope.</para> </sect2> </sect1> Index: web.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/web.xml,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** web.xml 6 Dec 2007 17:51:57 -0000 1.29 --- web.xml 7 Dec 2007 07:32:36 -0000 1.30 *************** *** 1,3 **** ! <?xml version="1.0" encoding="UTF-8"?> <chapter id="web"> <title>Spring.NET Web Framework</title> --- 1,3 ---- ! <?xml version="1.0" encoding="UTF-8"?> <chapter id="web"> <title>Spring.NET Web Framework</title> *************** *** 65,72 **** mapping solves this problem by allowing application developers to specify aliases for action results that map to target URLs based on information in ! an external configuration file that easily can be edited. Future releases ! of Spring.NET will also add a process management framework, which will ! take this approach to another level, allowing you to control complex page ! flows in a very simple way.</para> <para>Standard localization support is also limited in versions of ASP.NET --- 65,72 ---- mapping solves this problem by allowing application developers to specify aliases for action results that map to target URLs based on information in ! an external configuration file that easily can be edited. Under ! consideration for future releases of Spring.NET is a process management ! framework, which will take this approach to another level, allowing you to ! control complex page flows in a very simple way.</para> <para>Standard localization support is also limited in versions of ASP.NET *************** *** 118,122 **** uses many best practices for Spring.NET web applications, so please do refer to it as you are reading this (reference) material (see <xref ! linkend="springair"/>).</para> </sect1> --- 118,122 ---- uses many best practices for Spring.NET web applications, so please do refer to it as you are reading this (reference) material (see <xref ! linkend="springair" />).</para> </sect1> *************** *** 376,381 **** hierarchy until it finds said object definition (or ultimately fails and throws an exception).</para> - - <!-- TODO : insert diagram showing off the context hierarchy --> </sect2> </sect1> --- 376,379 ---- *************** *** 1494,1498 **** <note> ! The Visual Studio Web Form Editor will of course complain about binding attributes because it doesn't know them. You can safely ignore those warnings. </note> </sect2> --- 1492,1496 ---- <note> ! The Visual Studio Web Form Editor will of course complain about binding attributes because it doesn't know them. You can safely ignore those warnings. </note> </sect2> *************** *** 1623,1626 **** --- 1621,1625 ---- <tip> <title>VS2003</title> + <para>To view the .resx file for a page, you may need to enable "Project/Show All Files" in Visual Studio.NET. When "Show All Files" *************** *** 1635,1646 **** select the "Source Code" text editor.</para> </tip> <tip> <title>VS2005</title> ! <para>To create a resource file in VS2005, open your control or page in ! design mode and select "Tools/Generate local resource" from the menu</para> </tip> ! <para>Finally a localizer must be configured for the page to enable automatic localization: ! </para> <programlisting><object id="localizer" type="Spring.Globalization.Localizers.ResourceSetLocalizer, Spring.Core"/> --- 1634,1649 ---- select the "Source Code" text editor.</para> </tip> + <tip> <title>VS2005</title> ! ! <para>To create a resource file in VS2005, open your control or page ! in design mode and select "Tools/Generate local resource" from the ! menu</para> </tip> ! <para>Finally a localizer must be configured for the page to enable ! automatic localization:</para> ! <programlisting><object id="localizer" type="Spring.Globalization.Localizers.ResourceSetLocalizer, Spring.Core"/> *************** *** 1648,1652 **** <property name="Localizer" ref="localizer"/> </object></programlisting> ! <para>For more information on configuring localizers see <xref linkend="web-localizers" /></para> </sect2> --- 1651,1657 ---- <property name="Localizer" ref="localizer"/> </object></programlisting> ! ! <para>For more information on configuring localizers see <xref ! linkend="web-localizers" /></para> </sect2> *************** *** 1654,1659 **** <title>Global Message Sources</title> ! <para>The last two resource definitions from the previous section require some additional ! explanation:</para> <programlisting><data name="$this.saveButton.Text"> --- 1659,1664 ---- <title>Global Message Sources</title> ! <para>The last two resource definitions from the previous section ! require some additional explanation:</para> <programlisting><data name="$this.saveButton.Text"> *************** *** 1699,1705 **** </object></programlisting> ! <important><title>NET 2.0</title> ! <para>To use resources from your App_GlobalResources folder, specify <literal>App_GlobalResources</literal> as assembly name (see the SpringAir example application for more):</para> ! <literal><value>Resources.Strings, App_GlobalResources</value></literal> </important> --- 1704,1716 ---- </object></programlisting> ! <important> ! <title>NET 2.0</title> ! ! <para>To use resources from your App_GlobalResources folder, specify ! <literal>App_GlobalResources</literal> as assembly name (see the ! SpringAir example application for more):</para> ! ! <literal><value>Resources.Strings, ! App_GlobalResources</value></literal> </important> *************** *** 1717,1721 **** <para>Currently, the <literal>ResourceSetMessageSource</literal> is the only message source implementation that ships with Spring.NET.</para> - </sect2> --- 1728,1731 ---- *************** *** 1743,1754 **** <classname>Spring.Globalization.Localizers.ResourceSetLocalizer</classname>, that retrieves a list of resources to apply from the local resource ! file. Future releases of Spring.NET will provide other localizers that ! read resources from an XML file or even a flat text file that contains ! resource name-value pairs which will allow application developers to ! store resources within the files in a web application instead of as ! embedded resources in an assembly. Of course, if an application ! developer would rather store such resources in a database, he or she can ! write their own <classname>ILocalizer</classname> implementation that ! will load a list of resources to apply from a database.</para> <para>As mentioned previously, one would typically configure the --- 1753,1765 ---- <classname>Spring.Globalization.Localizers.ResourceSetLocalizer</classname>, that retrieves a list of resources to apply from the local resource ! file. Future releases of Spring.NET may provide other localizers as a ! convienence that read resources from an XML file or even a flat text ! file that contains resource name-value pairs which will allow ! application developers to store resources within the files in a web ! application instead of as embedded resources in an assembly. Of course, ! if an application developer would rather store such resources in a ! database, he or she can write their own ! <classname>ILocalizer</classname> implementation that will load a list ! of resources to apply from a database.</para> <para>As mentioned previously, one would typically configure the *************** *** 1789,1793 **** page. For example, think of the header columns for outgoing and return flights tables within the SpringAir application (see <xref ! linkend="springair"/>).</para> <para>In these situations, one should use a pull-style mechanism for --- 1800,1804 ---- page. For example, think of the header columns for outgoing and return flights tables within the SpringAir application (see <xref ! linkend="springair" />).</para> <para>In these situations, one should use a pull-style mechanism for *************** *** 2224,2229 **** declaration is required in order for Spring.NET <literal>Register*</literal> scripts to work properly.</para> - - <para>TODO : insert example</para> </sect2> --- 2235,2238 ---- *************** *** 2241,2246 **** embedded <literal>style</literal> section of the final HTML document.</para> - - <para>TODO : insert example</para> </sect2> --- 2250,2253 ---- Index: objects.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/objects.xml,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** objects.xml 6 Dec 2007 06:26:30 -0000 1.110 --- objects.xml 7 Dec 2007 07:32:36 -0000 1.111 *************** *** 1418,1426 **** XML verbosity when setting collection properties. See <xref linkend="objects-shortcutforms" /> for more information.</para> - - <para>Please be advised that the setting of multiple values for a - <literal>NameValueCollection</literal> is <ulink - url="http://opensource.atlassian.com/projects/spring/browse/SPRNET-58">planned - for a future release.</ulink></para> </sect3> --- 1418,1421 ---- Index: remoting-quickstart.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/remoting-quickstart.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** remoting-quickstart.xml 15 Oct 2007 23:32:33 -0000 1.12 --- remoting-quickstart.xml 7 Dec 2007 07:32:36 -0000 1.13 *************** *** 478,483 **** </programlisting></para> - <para>TODO: Show use of custom .net remoting schema.</para> - <para>You must specify the property <literal>ServiceInterface</literal> as well as the location of the remote object via the --- 478,481 ---- *************** *** 725,729 **** </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"> --- 723,727 ---- </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"> Index: tx-quickstart.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/tx-quickstart.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tx-quickstart.xml 17 Oct 2007 17:51:07 -0000 1.6 --- tx-quickstart.xml 7 Dec 2007 07:32:36 -0000 1.7 *************** *** 11,15 **** the use of declarative transactions using attributes and also the ability to change the transaction manager (local or distributed) via changes to ! only the configuration files - no code changes are required.</para> </section> --- 11,25 ---- the use of declarative transactions using attributes and also the ability to change the transaction manager (local or distributed) via changes to ! only the configuration files - no code changes are required. It also ! demonstrates some techniques for unit and integration testing an ! appliation as well as separating Spring's configuration files so that one ! is responsible for describing how the core business classes are configured ! and others that are responsbile for the database environment and ! application of AOP.</para> ! ! <para>This quickstart assumes you have installed a way to run NUnit tests ! within your IDE. Some excellent tools that let you do this are <ulink ! url="http://www.testdriven.net/">TestDriven.NET</ulink> and <ulink ! url="http://www.jetbrains.com/resharper/">ReSharper</ulink>.</para> </section> *************** *** 29,44 **** implementation <classname>AccountManager</classname> located in the namespace <classname>Spring.TxQuickStart.Services</classname>. The money ! is 'contained' in a credit table and a debit table in the database. The ! SQL Server schema for the tables is located in the file ! CreditsDebitsSchema.sql. Transferring the money requires an ACID operation ! on these two tables. The credit operation is defined via a <interfacename>IAccountCreditDao</interfacename> interface and the debit operation via an <interfacename>IAccountDebitDao</interfacename> ! interface. Implementations based on <classname>AdoTemplate</classname> are ! in the namespace <package>Spring.TxQuickStart.Dao.Ado</package>. Note that ! Spring's transaction management framework allows the mixing of data access ! technologies within the same transaction, i.e. ORM and ADO.NET. A ! demonstration of this features will be added to this quick start in a ! future release.</para> <section> --- 39,51 ---- implementation <classname>AccountManager</classname> located in the namespace <classname>Spring.TxQuickStart.Services</classname>. The money ! is recorded in a credit and debit table in the database. The SQL Server ! schema for the tables is located in the file CreditsDebitsSchema.sql. ! Transferring the money requires an ACID operation on these two tables. The ! credit operation is defined via a <interfacename>IAccountCreditDao</interfacename> interface and the debit operation via an <interfacename>IAccountDebitDao</interfacename> ! interface. Implementations of these interfaces using ! <classname>AdoTemplate</classname> are in the namespace ! <package>Spring.TxQuickStart.Dao.Ado</package>. </para> <section> *************** *** 62,67 **** void DebitAccount(float debitAmount); }</programlisting> - - <para></para> </section> </section> --- 69,72 ---- *************** *** 77,82 **** { AdoTemplate.ExecuteNonQuery(CommandType.Text, ! String.Format("insert into Credits (CreditAmount) VALUES ({0})", ! creditAmount)); } }</programlisting> --- 82,87 ---- { AdoTemplate.ExecuteNonQuery(CommandType.Text, ! "insert into Credits (CreditAmount) VALUES (@amount)", "amount", DbType.Decimal, 0, ! creditAmount); } }</programlisting> *************** *** 89,144 **** { AdoTemplate.ExecuteNonQuery(CommandType.Text, ! String.Format("insert into dbo.Debits (DebitAmount) VALUES ({0})", ! debitAmount)); } }</programlisting> <para>Both of these DAO implementations inherit from Spring's ! AdoDaoSupport class that provides convenient access to an AdoTemplate for ! performing data access operations. With no other properties that can be ! configured in these implementations, the only configuration required is ! setting of AdoDaoSupport's DbProvider property representing the connection ! to the database.</para> ! <para>The implementation of the service layer class, IAccountManager, is ! show below with extraneous declarations of properties for the DAO objects ! and boolean 'throwException' property.</para> <programlisting> public class AccountManager : IAccountManager { ! // fields and properties for DAO objects and boolean throwException not shown [Transaction] public void DoTransfer(float creditAmount, float debitAmount) { ! creditDao.CreateCredit(creditAmount); ! if (ThrowException) { ! throw new ArithmeticException("Couldn't do the math...."); } ! ! debitDao.DebitAccount(debitAmount); } }</programlisting> ! <para>The throw exception property, if true, will throw the shown ! exception and is used to demonstrate rollback behavior. Note the ! Transaction annotation above the method. This will be read by Spring and ! used to create a transactional proxy to AccountManager in order to perform ! declarative transaction management.</para> ! <para>The driver for the program is an NUnit test. It is convenient to ! download a VS.NET add-in, such as TestDriven.NET or Resharper to be able ! to run the unit test from within VS.NET. The code for the unit test driver ! is shown below</para> <programlisting> [TestFixture] public class AccountManagerTests { ! private IApplicationContext ctx; [SetUp] --- 94,236 ---- { AdoTemplate.ExecuteNonQuery(CommandType.Text, ! "insert into dbo.Debits (DebitAmount) VALUES (@amount)", "amount", DbType.Decimal, 0, ! debitAmount); } }</programlisting> <para>Both of these DAO implementations inherit from Spring's ! <classname>AdoDaoSupport</classname> class that provides convenient access ! to an <classname>AdoTemplate</classname> for performing data access ! operations. With no other properties that can be configured in these ! implementations, the only configuration required is setting of ! AdoDaoSupport's <classname>DbProvider</classname> property representing ! the connection to the database.</para> ! <para>The implementation of the service layer interface, ! <classname>IAccountManager</classname>, is shown below.</para> <programlisting> public class AccountManager : IAccountManager { ! private IAccountCreditDao accountCreditDao; ! private IAccountDebitDao accountDebitDao; ! ! private float maxTransferAmount = 1000000; ! ! public AccountManager(IAccountCreditDao accountCreditDao, IAccountDebitDao accountDebitDao) ! { ! this.accountCreditDao = accountCreditDao; ! this.accountDebitDao = accountDebitDao; ! } + public float MaxTransferAmount + { + get { return maxTransferAmount; } + set { maxTransferAmount = value; } + } + [Transaction] public void DoTransfer(float creditAmount, float debitAmount) { ! accountCreditDao.CreateCredit(creditAmount); ! if (creditAmount > maxTransferAmount || debitAmount > maxTransferAmount) { ! throw new ArithmeticException("see a teller big spender..."); } ! ! accountDebitDao.DebitAccount(debitAmount); } }</programlisting> ! <para>The if statement is a poor-mans representation of business logic, ! namely that there is a policy that does not allow the use of this service ! for amounts larger than $1,000,000. If the credit or debit amount is ! larger than 1,000,000 then and exception will be thrown. We can write a ! unit test that will test for this business logic and provide stub ! implementations of the DAO objects so that our tests are not only ! independent of the database but will also execute very quickly.<note> ! <para>Notice the Transaction attribute on the ! <literal>DoTransfer</literal> method. This attribute be read by Spring ! and used to create a transactional proxy to AccountManager in order to ! perform declarative transaction management.</para> ! </note></para> ! <para>The NUnit unit test for AccountManager is shown below</para> ! ! <programlisting> public class AccountManagerUnitTests ! { ! private IAccountManager accountManager; ! ! [SetUp] ! public void Setup() ! { ! IAccountCreditDao stubCreditDao = new StubAccountCreditDao(); ! IAccountDebitDao stubDebitDao = new StubAccountDebitDao(); ! accountManager = new AccountManager(stubCreditDao, stubDebitDao); ! } ! ! [Test] ! public void TransferBelowMaxAmount() ! { ! accountManager.DoTransfer(217, 217); ! } ! ! [Test] ! [ExpectedException(typeof(ArithmeticException))] ! public void TransferAboveMaxAmount() ! { ! accountManager.DoTransfer(2000000, 200000); ! } ! }</programlisting> ! ! <para>Running these tests we exercise both code pathways through the ! method <literal>DoTransfer</literal>. Nothing we have done so far is ! Spring specifc (aside from the presense of the [Transation] attribute. Now ! that we know the class works in isolation, we can now 'wire' up the ! application for use in production by specifying how the service and dao ! layers are related. This configuration file is shown below and can loosely ! be referred to as your 'appliation blueprint'. This configuration file is ! named application-config.xml and is an embedded resource inside the 'main' ! project, Spring.TxQuickStart.</para> ! ! <programlisting><objects xmlns='http://www.springframework.net'> ! ! <!-- DAO Implementations --> ! <object id="accountCreditDao" type="Spring.TxQuickStart.Dao.Ado.AccountCreditDao, Spring.TxQuickStart"> ! <property name="DbProvider" ref="CreditDbProvider"/> ! </object> ! ! <object id="accountDebitDao" type="Spring.TxQuickStart.Dao.Ado.AccountDebitDao, Spring.TxQuickStart"> ! <property name="DbProvider" ref="DebitDbProvider"/> ! </object> ! ! ! <!-- The service that performs multiple data access operations --> ! <object id="accountManager" ! type="Spring.TxQuickStart.Services.AccountManager, Spring.TxQuickStart"> ! <constructor-arg name="accountCreditDao" ref="accountCreditDao"/> ! <constructor-arg name="accountDebitDao" ref="accountDebitDao"/> ! </object> ! ! </objects></programlisting> ! ! <para>This configuration is selecting the real ADO.NET implementations ! that will insert records into the database. We can now write a NUnit ! integration test that will test the service and DAO layers. To do this we ! add on configuration information specific to our test environment. This ! extran configuration information will determine what databases we speak to ! and what transaction manager (local or distribute) to use. The code for ! this integration style NUnit test is shown below</para> <programlisting> [TestFixture] public class AccountManagerTests { ! private AdoTemplate adoTemplateCredit; ! private AdoTemplate adoTemplateDebit; ! ! private IAccountManager accountManager; [SetUp] *************** *** 149,175 **** 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 ! ctx = new XmlApplicationContext( ! "assembly://Spring.TxQuickStart.Tests/Spring.TxQuickStart/" + ctxName); } [Test] ! public void DeclarativeWithAttributes() { ! IAccountManager mgr = ctx["accountManager"] as IAccountManager; ! mgr.DoTransfer(217, 217); } }</programlisting> <para>The essential element is to create an instance of Spring's application context where the relevant layers of the application are ! 'wired' together. The top level object for the purposes of this quick ! start is the account manager, which is retrieved from Spring's application ! context and the method DoTransfer is executed.</para> ! ! <para>Note, future releases will instead have as the driver program a ! console application.</para> </section> --- 241,294 ---- NamespaceParserRegistry.RegisterParser(typeof(TxNamespaceParser)); NamespaceParserRegistry.RegisterParser(typeof(AopNamespaceParser)); ! IApplicationContext context = new XmlApplicationContext( ! "assembly://Spring.TxQuickStart.Tests/Spring.TxQuickStart/system-test-local-config.xml" ! ); ! accountManager = context["accountManager"] as IAccountManager; ! CleanDb(context); } [Test] ! public void TransferBelowMaxAmount() { ! accountManager.DoTransfer(217, 217); ! ! int numCreditRecords = (int)adoTemplateCredit.ExecuteScalar(CommandType.Text, "select count(*) from Credits"); ! int numDebitRecords = (int)adoTemplateDebit.ExecuteScalar(CommandType.Text, "select count(*) from Debits"); ! Assert.AreEqual(1, numCreditRecords); ! Assert.AreEqual(1, numDebitRecords); ! } ! ! [Test] ! [ExpectedException(typeof(ArithmeticException))] ! public void TransferAboveMaxAmount() ! { ! accountManager.DoTransfer(2000000, 200000); } + + private void CleanDb(IApplicationContext context) + { + IDbProvider dbProvider = (IDbProvider)context["DebitDbProvider"]; + adoTemplateDebit = new AdoTemplate(dbProvider); + adoTemplateDebit.ExecuteNonQuery(CommandType.Text, "truncate table Debits"); + + dbProvider = (IDbProvider)context["CreditDbProvider"]; + adoTemplateCredit = new AdoTemplate(dbProvider); + adoTemplateCredit.ExecuteNonQuery(CommandType.Text, "truncate table Credits"); + + } }</programlisting> <para>The essential element is to create an instance of Spring's application context where the relevant layers of the application are ! 'wired' together. The <classname>IAccountManager</classname> ! implementation is retrieved from the IoC container and stored as a field ! of the test class. The basic logic of the test are the same as in the unit ! test but in addtion there is the verification of actions performed in the ! database. The setup method puts the database tables into a known state ! before running the tests. Other techniques for performing integration ! testing that can alleviate the need to extensive database state management ! for integration tests is described in the <link ! linkend="testing">testing</link> section.</para> </section> *************** *** 177,272 **** <title>Configuration</title> ! <para>The configuration for application is shown below</para> ! <programlisting><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"> - <!-- <emphasis role="bold">Database Providers </emphasis>--> <db:provider id="DebitDbProvider" ! provider="System.Data.SqlClient" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Debits;User ID=springqa; Password=springqa"/> <db:provider id="CreditDbProvider" ! provider="System.Data.SqlClient" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Credits;User ID=springqa; Password=springqa"/> ! ! ! <!-- <emphasis role="bold">Transaction Manager</emphasis> if using two databases, one containing the credit table and the other a debit table --> ! ! <object id="transactionManager" ! type="Spring.Data.Core.TxScopeTransactionManager, Spring.Data"> ! </object> ! ! ! <!-- <emphasis role="bold">DAO Layer</emphasis> --> ! ! <object id="accountCreditDao" type="Spring.TxQuickStart.Dao.Ado.AccountCreditDao, Spring.TxQuickStart"> ! <property name="DbProvider" ref="CreditDbProvider"/> ! </object> ! <object id="accountDebitDao" type="Spring.TxQuickStart.Dao.Ado.AccountDebitDao, Spring.TxQuickStart"> <property name="DbProvider" ref="DebitDbProvider"/> </object> ! ! <!-- <emphasis role="bold">The service layer</emphasis> that performs multiple data access operations --> ! <object id="accountManager" ! type="Spring.TxQuickStart.Services.AccountManager, Spring.TxQuickStart"> ! <property name="AccountCreditDao" ref="accountCreditDao"/> ! <property name="AccountDebitDao" ref="accountDebitDao"/> ! <property name="ThrowException" value="false"/> ! </object> ! ! <!-- <emphasis role="bold">Enable declarative transaction management</emphasis> --> ! <tx:attribute-driven/> </objects></programlisting> ! <para>Moving from top to bottom in th configuration file, the database ! type and connection parameters are first specified for the two databases. ! The type of transaction manager is then selected, in this case we are ! showing the use of TxScopeTransactionManager that uses .NET 2.0 ! System.Transactions as the implementation, allowing for distributed ! transactions between the two different databases listed. The DAO layer is ! then configured with each DAO object referring to its appropriate ! database. The service layer then ties together the two DAO objects and ! configures the AccountManager not to throw exceptions. Lastly, declarative ! transaction management through the use of attributes is enable. In a ! larger application the different layers would typically be broken up into ! individual configuration files and imported into the main configuration ! file. This allows your configuration to mirror your architecture.</para> ! <para>Running the tests will result in 217 being entered into the Credits ! and Debits table of each database. You should fire up SQL Server ! Management Studio or equivalent to verify this. It is also interesting to ! view the distributed transaction monitor that is part of the Component ! Services GUI. If you change the property ThrowException to true, and ! re-run the test, then you will not have the value 217 entered in either ! table.</para> ! <para>If we need to switch from distributed transactions to local ! transactions with a single database, then all that needs to change is the ! configuration of the database providers as well as selecting a different ! transaction manager. The application code does not need to change. The ! configuration to use a single database is listed below</para> ! <programlisting> <db:provider id="DebitDbProvider" provider="System.Data.SqlClient" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=CreditsAndDebits;User ID=springqa; Password=springqa"/> <db:provider id="CreditDbProvider" provider="System.Data.SqlClient" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=CreditsAndDebits;User ID=springqa; Password=springqa"/> ! <object id="transactionManager" ! type="Spring.Data.AdoPlatformTransactionManager, Spring.Data"> ! <property name="DbProvider" ref="DbProvider"/> ! </object></programlisting> ! <para>Notice that the Initial Catalog value has changed.</para> <section> --- 296,403 ---- <title>Configuration</title> ! <para>The configuration file system-test-local-config.xml shown in the ! previous program listing includes application-config.xml and specifies the ! database to use and the local (not distributed) transaction manager ! AdoPlatformTransactionManager. This configuration file is shown ! below</para> ! <programlisting><objects xmlns="http://www.springframework.net" xmlns:db="http://www.springframework.net/database" ! xmlns:tx="http://www.springframework.net/tx"> + <!-- Imports application configuration --> + <import resource="assembly://Spring.TxQuickStart/Spring.TxQuickStart/application-config.xml"/> + + <!-- Imports additional aspects --> + <!-- + <import resource="assembly://Spring.TxQuickStart.Tests/Spring.TxQuickStart/aspects-config.xml"/> + --> + + + <!-- Database Providers --> + <db:provider id="DebitDbProvider" ! provider="System.Data.SqlClient" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=CreditsAndDebits;User ID=springqa; Password=springqa"/> <db:provider id="CreditDbProvider" ! provider="System.Data.SqlClient" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=CreditsAndDebits;User ID=springqa; Password=springqa"/> ! ! <alias name="DebitDbProvider" alias="CreditDbProvider"/> ! <!-- Transaction Manager if using a single database that contain both credit and debit tables --> ! <object id="transactionManager" ! type="Spring.Data.Core.AdoPlatformTransactionManager, Spring.Data"> <property name="DbProvider" ref="DebitDbProvider"/> </object> ! <!-- Transaction aspect --> ! <tx:attribute-driven/> </objects></programlisting> ! <para>Moving from top to bottom in th configuration file, the ! 'application-blueprint' configuration file is included. Then the database ! type and connection parameters are specified for the two databases. The ! names of these provides must match those specific in ! application-config.xml. Since the two names point to the same database, an ! alias configuration element is used to have them point to the same ! dbProvider under different names. The type of transaction manager is then ! selected, in this case we are showing the use of local tansactions with ! AdoPlatformTransactionManager. Running the tests will result in 217 being ! entered into the Credits and Debits table of each database. You can fire ! up SQL Server Management Studio or equivalent to verify this.</para> ! <para>To switch to distributed transaction you can refer to the ! configuration file system-test-dtc-config.xml, which is shown below</para> ! <programlisting>objects xmlns='http://www.springframework.net' ! xmlns:db="http://www.springframework.net/database" ! xmlns:tx="http://www.springframework.net/tx"> ! ! <!-- Imports application configuration --> ! <import resource="assembly://Spring.TxQuickStart/Spring.TxQuickStart/application-config.xml"/> ! ! <!-- Imports additional aspects --> ! <!-- ! <import resource="assembly://Spring.TxQuickStart.Tests/Spring.TxQuickStart/aspects-config.xml"/> ! --> ! ! <db:provider id="DebitDbProvider" provider="System.Data.SqlClient" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Debits;User ID=springqa; Password=springqa"/> ! <db:provider id="CreditDbProvider" provider="System.Data.SqlClient" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Credits;User ID=springqa; Password=springqa"/> ! ! ! <!-- Transaction Manager if using two databases, one containing the credit table and the other a debit table --> ! <object id="transactionManager" ! type="Spring.Data.Core.TxScopeTransactionManager, Spring.Data"> ! </object> ! ! <!-- Transaction aspect --> ! <tx:attribute-driven/> ! ! </objects></programlisting> ! ! <para>TxScopeTransactionManager uses .NET 2.0 System.Transactions as the ! implementation, allowing for distributed transactions between the two ! different databases listed. In a larger application the different layers ! would typically be broken up into individual configuration files and ! imported into the main configuration file. This allows your configuration ! to mirror your architecture.</para> ! ! <para>You can also use the configuraiton file ! system-test-dtc-es-config.xml that will use EnterpriseServices to perform ! transaction management.</para> <section> *************** *** 279,309 **** shown below.</para> ! <programlisting> [Transaction(NoRollbackFor = new Type[] { typeof(ApplicationException) })] public void DoTransfer(float creditAmount, float debitAmount) { ! creditDao.CreateCredit(creditAmount); ! DoThrowException(); ! debitDao.DebitAccount(debitAmount); ! } ! public void DoThrowException() ! { ! throw new ApplicationException("Testing No Rollback 'Rule'"); ! }</programlisting> <para>The expected behavior is that the credit table will be updated even though the exception is thrown. This is due to specifying that ! exceptions of the type ApplicationException should not rollback the database transaction. Running the test code below, verifies that the ! exception still propagates out of the method. Use SQL Server Management ! Studio or equivalent to verify the state of the Credit and Debit ! table.</para> <programlisting> [Test] - [ExpectedException(typeof(ApplicationException), "Testing No Rollback 'Rule'")] public void DeclarativeWithAttributesNoRollbackFor() { ! IAccountManager mgr = ctx["accountManager"] as IAccountManager; ! mgr.DoTransfer(314, 314); }</programlisting> </section> --- 410,448 ---- shown below.</para> ! <programlisting> [Transaction(NoRollbackFor = new Type[] { typeof(ArithmeticException) })] public void DoTransfer(float creditAmount, float debitAmount) { ! accountCreditDao.CreateCredit(creditAmount); ! if (creditAmount > maxTransferAmount || debitAmount > maxTransferAmount) ! { ! throw new ArithmeticException("see a teller big spender..."); ! } ! ! accountDebitDao.DebitAccount(debitAmount); ! } </programlisting> ! ! <para>All that has changed is the use of the NoRollbackFor property on ! the transaction attribute.</para> <para>The expected behavior is that the credit table will be updated even though the exception is thrown. This is due to specifying that ! exceptions of the type ArithmethicException should not rollback the database transaction. Running the test code below, verifies that the ! exception still propagates out of the method. </para> <programlisting> [Test] public void DeclarativeWithAttributesNoRollbackFor() { ! try ! { ! accountManager.DoTransfer(2000000, 2000000); ! Assert.Fail("Should have thrown Arithmethic Exception"); ! } catch (ArithmeticException) { ! int numCreditRecords = (int)adoTemplateCredit.ExecuteScalar(CommandType.Text, "select count(*) from Credits"); ! int numDebitRecords = (int)adoTemplateDebit.ExecuteScalar(CommandType.Text, "select count(*) from Debits"); ! Assert.AreEqual(1, numCreditRecords); ! Assert.AreEqual(0, numDebitRecords); ! } }</programlisting> </section> *************** *** 318,327 **** program methods that have the Transaction attribute applied. In this example we will add logging of thrown exceptions using Spring's ! ExceptionHandlerAdvice. No code is required to be changed in order to have ! this additional functionality. Instead modify the configuration to the ! following</para> - <programlisting> - <tx:attribute-driven order="10"/> <object name="exceptionAdvice" type="Spring.Aspects.Exceptions.ExceptionHandlerAdvice, Spring.Aop"> --- 457,475 ---- program methods that have the Transaction attribute applied. In this example we will add logging of thrown exceptions using Spring's ! ExceptionHandlerAdvice as well logging of the service layer method ! invocation. No code is required to be changed in order to have this ! additional functionality. Instead all you have to do is uncomment the ! line</para> ! ! <programlisting> <import resource="assembly://Spring.TxQuickStart.Tests/Spring.TxQuickStart/aspects-config.xml"/></programlisting> ! ! <para> in either system-test-dtc-config.xml or ! system-test-local-config.xml The aspect configuration file is shown ! below</para> ! ! <programlisting><objects xmlns='http://www.springframework.net' ! xmlns:aop="http://www.springframework.net/aop"> ! <object name="exceptionAdvice" type="Spring.Aspects.Exceptions.ExceptionHandlerAdvice, Spring.Aop"> *************** *** 333,336 **** --- 481,497 ---- </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"> <property name="Attribute" value="Spring.Transaction.Interceptor.TransactionAttribute, Spring.Data"/> *************** *** 338,345 **** <aop:config> <aop:advisor id="exceptionProcessAdvisor" order="1" ! advice-ref="exceptionAdvice" pointcut-ref="txAttributePointcut"/> ! </aop:config></programlisting> <para>The transaction aspect is now additionally configured with an order --- 499,514 ---- <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></programlisting> <para>The transaction aspect is now additionally configured with an order *************** *** 350,361 **** <classname>Spring.Aspects.Exceptions.ExceptionHandlerAdvice</classname>. The location where that behavior is applied, the pointcut, is the ! Transaction attribute. The aop configuration section on the bottom is what ! ties together the behavior and where it will take place in the program ! flow. Under the covers the transaction configuration, ! <tx:attribute-driven/> creates similar advice and pointcut ! definitions. Setting the ThrowException property of AccountManager to ! true, you will see in the log file the message</para> ! <programlisting>LogExceptionHandler - Logging an exception thrown from method DoTransfer </programlisting> --- 519,551 ---- <classname>Spring.Aspects.Exceptions.ExceptionHandlerAdvice</classname>. The location where that behavior is applied, the pointcut, is the ! Transaction attribute. The logging of method arguments and execution time ! is specified by configuring an instance of ! <classname>Spring.Aspects.Logging.SimpleLoggingAdvice</classname>.</para> ! <para>The AOP configuration section on the bottom is what ties together ! the behavior and where it will take place in the program flow. Under the ! covers the transaction configuration, <tx:attribute-driven/> creates ! similar advice and pointcut definitions. Running the test ! TransferBelowMaxAmount will then log the following messages</para> ! ! <programlisting>INFO - Entering DoTransfer;45b6af04-b736-4efa-a489-45462726ddf2;creditAmount=217; debitAmount=217 ! INFO - Exiting DoTransfer;45b6af04-b736-4efa-a489-45462726ddf2;1328.125 ms;return= ! </programlisting> ! ! <para>When the test case of the test TransferAboveMaxAmount is run the ! following messages are logged</para> ! ! <programlisting>INFO - Entering DoTransfer;d94bc81b-a4ff-4ca1-9aaa-f2834f262307;creditAmount=2000000; debitAmount=200000 ! INFO - Exception thrown in DoTransferDoTransfer;d94bc81b-a4ff-4ca1-9aaa-f2834f262307;1140.625 ! System.ArithmeticException: see a teller big spender... ! at Spring.TxQuickStart.Services.AccountManager.DoTransfer(Single creditAmount, Single debitAmount) in L:\projects\Spring.Net\examples\Spring\Spring.TxQuickStart\src\Spring\Spring.TxQuickStart\TxQuickStart\Services\AccountManager.cs:line 36 ! at Spring.DynamicReflection.Method_DoTransfer_ec48557f22b149958fd2243413136600.Invoke(Object target, Object[] args) ! at Spring.Reflection.Dynamic.SafeMethod.Invoke(Object target, Object[] arguments) in l:\projects\Spring.Net\src\Spring\Spring.Core\Reflection\Dynamic\DynamicMethod.cs:line 108 ! at Spring.Aop.Framework.DynamicMethodInvocation.InvokeJoinpoint() in l:\projects\Spring.Net\src\Spring\Spring.Aop\Aop\Framework\DynamicMethodInvocation.cs:line 89 ! at Spring.Aop.Framework.AbstractMethodInvocation.Proceed() in l:\projects\Spring.Net\src\Spring\Spring.Aop\Aop\Framework\AbstractMethodInvocation.cs:line 257 ! at Spring.Transaction.Interceptor.TransactionInterceptor.Invoke(IMethodInvocation invocation) in l:\projects\Spring.Net\src\Spring\Spring.Data\Transaction\Interceptor\TransactionInterceptor.cs:line 80 ! at Spring.Aop.Framework.AbstractMethodInvocation.Proceed() in l:\projects\Spring.Net\src\Spring\Spring.Aop\Aop\Framework\AbstractMethodInvocation.cs:line 282 ! at Spring.Aspects.Logging.SimpleLoggingAdvice.InvokeUnderLog(IMethodInvocation invocation, ILog log) in l:\projects\Spring.Net\src\Spring\Spring.Aop\Aspects\Logging\SimpleLoggingAdvice.cs:line 185 ! TRACE - Logging an exception thrown from method DoTransfer </programlisting> Index: aop.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/aop.xml,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** aop.xml 27 Nov 2007 21:01:42 -0000 1.46 --- aop.xml 7 Dec 2007 07:32:36 -0000 1.47 *************** *** 266,270 **** that are most common targets for AOP proxies.</para> ! <para>In the future release we will implement proxies using inheritance, which will allow you to proxy classes without interfaces as well and will remove some of the remaining raw reference issues that cannot be --- 266,270 ---- that are most common targets for AOP proxies.</para> ! <para>In a future release we will implement proxies using inheritance, which will allow you to proxy classes without interfaces as well and will remove some of the remaining raw reference issues that cannot be *************** *** 1548,1553 **** <para>You can add interceptors or advisors, and manipulate them for the ! life of the <literal>ProxyFactory</literal>. <emphasis>TODO: note on ! introductions.</emphasis></para> <para>There are also convenience methods on --- 1548,1552 ---- <para>You can add interceptors or advisors, and manipulate them for the ! life of the <literal>ProxyFactory.</literal></para> <para>There are also convenience methods on *************** *** 1627,1635 **** <para>By default, it's possible to add or remove advisors or interceptors ! even once a proxy has been created. <emphasis>TODO: Need to query this for ! introductions</emphasis> The only restriction is that it's impossible to ! add or remove an introduction advisor, as existing proxies from the ! factory will not show the interface change. (You can obtain a new proxy ! from the factory to avoid this problem.)</para> <remark>It's questionable whether it's advisable (no pun intended) to --- 1626,1633 ---- <para>By default, it's possible to add or remove advisors or interceptors ! even once a proxy has been created. The only restriction is that it's ! impossible to add or remove an introduction advisor, as existing proxies ! from the factory will not show the interface change. (You can obtain a new ! proxy from the factory to avoid this problem.)</para> <remark>It's questionable whether it's advisable (no pun intended) to *************** *** 2084,2088 **** programmatic or through XML based configuration.</para> ! <para>TODO: Example based on transaction attributes.</para> </sect2> </sect1> --- 2082,2088 ---- programmatic or through XML based configuration.</para> ! <para>Several of the aspect provided with Spring use attribute driven ! autoproxying. The most prominent example is <link ! linkend="transactions">Transaction</link> support.</para> </sect2> </sect1> |
From: Mark P. <mar...@us...> - 2007-12-07 07:31:47
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10853 Modified Files: Spring.TxQuickStart.2003.sln Log Message: updated txquickstart for .net 1.1 Index: Spring.TxQuickStart.2003.sln =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/Spring.TxQuickStart.2003.sln,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Spring.TxQuickStart.2003.sln 6 Dec 2006 07:27:51 -0000 1.1 --- Spring.TxQuickStart.2003.sln 7 Dec 2007 07:31:43 -0000 1.2 *************** *** 11,25 **** --- 11,37 ---- GlobalSection(SolutionConfiguration) = preSolution Debug = Debug + Debug-1.1 = Debug-1.1 Release = Release + Release-1.1 = Release-1.1 + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {B3C676F7-52DA-41D7-953C-38C9E62FFDF6}.Debug.ActiveCfg = Debug|.NET {B3C676F7-52DA-41D7-953C-38C9E62FFDF6}.Debug.Build.0 = Debug|.NET + {B3C676F7-52DA-41D7-953C-38C9E62FFDF6}.Debug-1.1.ActiveCfg = Debug|.NET + {B3C676F7-52DA-41D7-953C-38C9E62FFDF6}.Debug-1.1.Build.0 = Debug|.NET {B3C676F7-52DA-41D7-953C-38C9E62FFDF6}.Release.ActiveCfg = Release|.NET {B3C676F7-52DA-41D7-953C-38C9E62FFDF6}.Release.Build.0 = Release|.NET + {B3C676F7-52DA-41D7-953C-38C9E62FFDF6}.Release-1.1.ActiveCfg = Release|.NET + {B3C676F7-52DA-41D7-953C-38C9E62FFDF6}.Release-1.1.Build.0 = Release|.NET {026EED0B-267B-4518-AD3B-B3D4291CC2F8}.Debug.ActiveCfg = Debug|.NET {026EED0B-267B-4518-AD3B-B3D4291CC2F8}.Debug.Build.0 = Debug|.NET + {026EED0B-267B-4518-AD3B-B3D4291CC2F8}.Debug-1.1.ActiveCfg = Debug|.NET + {026EED0B-267B-4518-AD3B-B3D4291CC2F8}.Debug-1.1.Build.0 = Debug|.NET {026EED0B-267B-4518-AD3B-B3D4291CC2F8}.Release.ActiveCfg = Release|.NET {026EED0B-267B-4518-AD3B-B3D4291CC2F8}.Release.Build.0 = Release|.NET + {026EED0B-267B-4518-AD3B-B3D4291CC2F8}.Release-1.1.ActiveCfg = Release|.NET + {026EED0B-267B-4518-AD3B-B3D4291CC2F8}.Release-1.1.Build.0 = Release|.NET EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution |
From: Mark P. <mar...@us...> - 2007-12-07 07:31:47
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/src/Spring/Spring.TxQuickStart In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10853/src/Spring/Spring.TxQuickStart Modified Files: Spring.TxQuickStart.2003.csproj Log Message: updated txquickstart for .net 1.1 Index: Spring.TxQuickStart.2003.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/src/Spring/Spring.TxQuickStart/Spring.TxQuickStart.2003.csproj,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Spring.TxQuickStart.2003.csproj 18 Jun 2007 20:24:28 -0000 1.4 --- Spring.TxQuickStart.2003.csproj 7 Dec 2007 07:31:43 -0000 1.5 *************** *** 2,6 **** <CSHARP ProjectType = "Local" ! ProductVersion = "7.10.3077" SchemaVersion = "2.0" ProjectGuid = "{B3C676F7-52DA-41D7-953C-38C9E62FFDF6}" --- 2,6 ---- <CSHARP ProjectType = "Local" ! ProductVersion = "7.10.6030" SchemaVersion = "2.0" ProjectGuid = "{B3C676F7-52DA-41D7-953C-38C9E62FFDF6}" *************** *** 95,98 **** --- 95,102 ---- <Include> <File + RelPath = "TxQuickStart\application-config.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "TxQuickStart\CreditsDebitsSchema.sql" BuildAction = "Content" |
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-serv10853/test/Spring/Spring.TxQuickStart.Tests/TxQuickStart Added Files: system-test-dtc-es-config.xml Removed Files: DTC1.1AppContext.xml DTCAppContext.xml Log Message: updated txquickstart for .net 1.1 --- DTC1.1AppContext.xml DELETED --- --- NEW FILE: system-test-dtc-es-config.xml --- (This appears to be a binary file; contents omitted.) --- DTCAppContext.xml DELETED --- |
From: Mark P. <mar...@us...> - 2007-12-07 07:31:47
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/src/Spring/Spring.TxQuickStart/TxQuickStart/Services In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10853/src/Spring/Spring.TxQuickStart/TxQuickStart/Services Modified Files: AccountManager.cs Log Message: updated txquickstart for .net 1.1 Index: AccountManager.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/src/Spring/Spring.TxQuickStart/TxQuickStart/Services/AccountManager.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AccountManager.cs 7 Dec 2007 02:36:15 -0000 1.7 --- AccountManager.cs 7 Dec 2007 07:31:43 -0000 1.8 *************** *** 1,4 **** --- 1,6 ---- using System; + using System.Data; + using Spring.Transaction; using Spring.Transaction.Interceptor; using Spring.TxQuickStart.Dao; *************** *** 33,37 **** // [Transaction(NoRollbackFor = new Type[] { typeof(ArithmeticException) })] ! [Transaction] public void DoTransfer(float creditAmount, float debitAmount) { --- 35,39 ---- // [Transaction(NoRollbackFor = new Type[] { typeof(ArithmeticException) })] ! [Transaction(TransactionPropagation.Required)] public void DoTransfer(float creditAmount, float debitAmount) { |
From: Mark P. <mar...@us...> - 2007-12-07 07:31:46
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/test/Spring/Spring.TxQuickStart.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10853/test/Spring/Spring.TxQuickStart.Tests Modified Files: Spring.TxQuickStart.Tests.2003.csproj Spring.TxQuickStart.Tests.2005.csproj Log Message: updated txquickstart for .net 1.1 Index: Spring.TxQuickStart.Tests.2003.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/test/Spring/Spring.TxQuickStart.Tests/Spring.TxQuickStart.Tests.2003.csproj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Spring.TxQuickStart.Tests.2003.csproj 9 Aug 2007 04:16:44 -0000 1.5 --- Spring.TxQuickStart.Tests.2003.csproj 7 Dec 2007 07:31:43 -0000 1.6 *************** *** 86,92 **** /> <Reference ! Name = "Spring.Core" ! AssemblyName = "Spring.Core" ! HintPath = "..\..\..\..\..\..\bin\net\1.1\debug\Spring.Core.dll" /> <Reference --- 86,102 ---- /> <Reference ! Name = "nunit.framework" ! AssemblyName = "nunit.framework" ! HintPath = "..\..\..\..\..\..\lib\Net\1.1\nunit.framework.dll" ! /> ! <Reference ! Name = "Common.Logging.Log4Net" ! AssemblyName = "Common.Logging.Log4Net" ! HintPath = "..\..\..\..\..\..\lib\Net\1.1\Common.Logging.Log4Net.dll" ! /> ! <Reference ! Name = "Common.Logging" ! AssemblyName = "Common.Logging" ! HintPath = "..\..\..\..\..\..\lib\Net\1.1\Common.Logging.dll" /> <Reference *************** *** 96,108 **** /> <Reference - Name = "nunit.framework" - AssemblyName = "nunit.framework" - HintPath = "..\..\..\..\..\..\lib\Net\1.1\nunit.framework.dll" - /> - <Reference Name = "Spring.Aop" AssemblyName = "Spring.Aop" HintPath = "..\..\..\..\..\..\bin\net\1.1\debug\Spring.Aop.dll" /> </References> </Build> --- 106,118 ---- /> <Reference Name = "Spring.Aop" AssemblyName = "Spring.Aop" HintPath = "..\..\..\..\..\..\bin\net\1.1\debug\Spring.Aop.dll" /> + <Reference + Name = "Spring.Core" + AssemblyName = "Spring.Core" + HintPath = "..\..\..\..\..\..\bin\net\1.1\debug\Spring.Core.dll" + /> </References> </Build> *************** *** 124,134 **** /> <File ! RelPath = "TxQuickStart\DTC1.1AppContext.xml" BuildAction = "EmbeddedResource" /> <File ! RelPath = "TxQuickStart\DTCAppContext.xml" BuildAction = "EmbeddedResource" /> </Include> </Files> --- 134,163 ---- /> <File ! RelPath = "TxQuickStart\aspects-config.xml" BuildAction = "EmbeddedResource" /> <File ! RelPath = "TxQuickStart\system-test-dtc-es-config.xml" ! BuildAction = "EmbeddedResource" ! /> ! <File ! RelPath = "TxQuickStart\system-test-local-config.xml" BuildAction = "EmbeddedResource" /> + <File + RelPath = "TxQuickStart\Services\AccountManagerUnitTests.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "TxQuickStart\Services\StubAccountCreditDao.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "TxQuickStart\Services\StubAccountDebitDao.cs" + SubType = "Code" + BuildAction = "Compile" + /> </Include> </Files> Index: Spring.TxQuickStart.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/test/Spring/Spring.TxQuickStart.Tests/Spring.TxQuickStart.Tests.2005.csproj,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Spring.TxQuickStart.Tests.2005.csproj 7 Dec 2007 02:36:20 -0000 1.4 --- Spring.TxQuickStart.Tests.2005.csproj 7 Dec 2007 07:31:43 -0000 1.5 *************** *** 85,88 **** --- 85,91 ---- <EmbeddedResource Include="TxQuickStart\system-test-dtc-config.xml" /> </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="TxQuickStart\system-test-dtc-es-config.xml" /> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. |