springnet-commits Mailing List for Spring Framework .NET (Page 20)
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...> - 2008-01-25 17:34:15
|
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10706 Modified Files: aop.xml transaction.xml Log Message: misc updates Index: transaction.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/transaction.xml,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** transaction.xml 24 Jan 2008 17:32:36 -0000 1.25 --- transaction.xml 25 Jan 2008 17:34:11 -0000 1.26 *************** *** 382,388 **** connection/transaction pair that is aware of the transactional calling context and returns a pair suitable for that context. The class ! ConnectionUtils contains the static method ConnectionTxPair ! GetConnectionTxPair(IDbProvider provider) which serves this ! purpose.</para> </sect2> </sect1> --- 382,388 ---- connection/transaction pair that is aware of the transactional calling context and returns a pair suitable for that context. The class ! <classname>ConnectionUtils</classname> contains the static method ! <literal>ConnectionTxPair GetConnectionTxPair(IDbProvider provider) ! </literal>which serves this purpose.</para> </sect2> </sect1> *************** *** 452,458 **** significant advantage that business objects don't need to depend on the transaction infrastructure. For example, they typically don't need to ! import any Spring APIs, transaction or other.</para> ! <para></para> <sect2 id="tx-understandingimpl"> --- 452,460 ---- significant advantage that business objects don't need to depend on the transaction infrastructure. For example, they typically don't need to ! import any Spring APIs, transaction or other. If you would like to ! rollback the transaction programmatically and you are using declarative ! transaction management, use the utility method</para> ! <programlisting>TransactionInterceptor.CurrentTransactionStatus.RollbackOnly = true;</programlisting> <sect2 id="tx-understandingimpl"> *************** *** 1060,1064 **** below.</para> ! <programlisting><object id="serviceOperation" type="RegularExpressionPointcut"> <property name="pattern" value="Spring.TxQuickStart.Services.*"/> </object> --- 1062,1066 ---- below.</para> ! <programlisting><object id="serviceOperation" type="Spring.Aop.Support.SdkRegularExpressionMethodPointcut, Spring.Aop"> <property name="pattern" value="Spring.TxQuickStart.Services.*"/> </object> *************** *** 1832,1839 **** in the transaction lifecycle. Note that you can register for lifecycle call back information for any of the transaction managers you use, be it ! NHibernate or local ADO.NET transactions. </para> <para>The method to register a callback with the ! <classname>TransactionSynchronizationManager</classname> is </para> <programlisting>public static void RegisterSynchronization( ITransactionSynchronization synchronization ) </programlisting> --- 1834,1841 ---- in the transaction lifecycle. Note that you can register for lifecycle call back information for any of the transaction managers you use, be it ! NHibernate or local ADO.NET transactions.</para> <para>The method to register a callback with the ! <classname>TransactionSynchronizationManager</classname> is</para> <programlisting>public static void RegisterSynchronization( ITransactionSynchronization synchronization ) </programlisting> Index: aop.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/aop.xml,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** aop.xml 16 Jan 2008 17:21:44 -0000 1.49 --- aop.xml 25 Jan 2008 17:34:10 -0000 1.50 *************** *** 401,405 **** <para>Using this class, you can provide a list of pattern Strings. If any of these is a match, the pointcut will evaluate to true (so ! the result is effectively the union of these pointcuts.)</para> --- 401,408 ---- <para>Using this class, you can provide a list of pattern Strings. If any of these is a match, the pointcut will evaluate to true (so ! the result is effectively the union of these pointcuts.). The ! matching is done against the full class name so you can use this ! pointcut if you would like to apply advice to all the classes in a ! particular namespace.</para> *************** *** 2120,2124 **** unordered.</para> ! </sect3> --- 2123,2127 ---- unordered.</para> ! </sect3> |
From: Mark P. <mar...@us...> - 2008-01-25 15:04:45
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18276 Modified Files: HibernateAccessor.cs Log Message: SPRNET-854 - Fix NullReferenceException in HibernateAccessor when SqlString in ADOException is null. Index: HibernateAccessor.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate/HibernateAccessor.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** HibernateAccessor.cs 7 Aug 2007 18:55:41 -0000 1.5 --- HibernateAccessor.cs 25 Jan 2008 15:04:39 -0000 1.6 *************** *** 446,454 **** protected virtual DataAccessException ConvertAdoAccessException(ADOException ex) { - - //TODO investigate innerexception return AdoExceptionTranslator.Translate( "Hibernate operation: " + ex.Message, null, ex.InnerException); - } --- 446,451 ---- |
From: Mark P. <mar...@us...> - 2008-01-25 15:04:37
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate12/Data/NHibernate In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18263 Modified Files: HibernateAccessor.cs Log Message: SPRNET-854 - Fix NullReferenceException in HibernateAccessor when SqlString in ADOException is null. Index: HibernateAccessor.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate12/Data/NHibernate/HibernateAccessor.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** HibernateAccessor.cs 19 Sep 2007 22:58:11 -0000 1.6 --- HibernateAccessor.cs 25 Jan 2008 15:04:28 -0000 1.7 *************** *** 449,455 **** { ! //TODO investigate innerexception return AdoExceptionTranslator.Translate( ! "Hibernate operation: " + ex.Message, ex.SqlString.ToString(), ex.InnerException); } --- 449,457 ---- { ! string sqlString = (ex.SqlString != null) ! ? ex.SqlString.ToString() ! : string.Empty; return AdoExceptionTranslator.Translate( ! "Hibernate operation: " + ex.Message, sqlString, ex.InnerException); } |
From: Mark P. <mar...@us...> - 2008-01-24 17:38:34
|
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv20468 Modified Files: objects.xml Log Message: additional info on creating your own IVariableSource Index: objects.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/objects.xml,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -d -r1.117 -r1.118 *** objects.xml 24 Jan 2008 17:32:36 -0000 1.117 --- objects.xml 24 Jan 2008 17:38:31 -0000 1.118 *************** *** 4392,4396 **** </property> </object> ! </programlisting></para> </sect3> </sect2> --- 4392,4407 ---- </property> </object> ! </programlisting>The IVariableSource interface is shown below</para> ! ! <programlisting>public interface IVariableSource ! { ! string ResolveVariable(string name); ! }</programlisting> ! ! <para>This is a simple contract to implement if you should decide to ! create your own custom implemention. Look at the source code of the ! current implementations for some inspiration if you go that route. To ! register your own custom implemenation, simply configure ! VariablePlaceholderConfigurer to refer to your class.</para> </sect3> </sect2> |
From: Mark P. <mar...@us...> - 2008-01-24 17:32:42
|
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17099 Modified Files: ado.xml dbprovider.xml objects.xml transaction.xml Log Message: Add section on getting callbacks for transaction lifecycle clarify usage of RETURN_VALUE for stored procedures, add additional section names for linking misc updates Index: transaction.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/transaction.xml,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** transaction.xml 16 Jan 2008 17:21:44 -0000 1.24 --- transaction.xml 24 Jan 2008 17:32:36 -0000 1.25 *************** *** 1819,1821 **** --- 1819,1865 ---- not difficult to configure in Spring.</para> </sect1> + + <sect1> + <title>Transaction lifecycle and status information</title> + + <para>You can query the status of the current Spring managed transaction + with the class <classname>TransactionSynchronizationManager</classname>. + Typical application code should not need to rely on using this class but + in some cases it is convenient to receive events around the lifecycle of + the transaction, i.e. before committing, after committing. + <classname>TransactionSynchronizationManager</classname> provides a method + to register a callback object that is informed on all significant stages + in the transaction lifecycle. Note that you can register for lifecycle + call back information for any of the transaction managers you use, be it + NHibernate or local ADO.NET transactions. </para> + + <para>The method to register a callback with the + <classname>TransactionSynchronizationManager</classname> is </para> + + <programlisting>public static void RegisterSynchronization( ITransactionSynchronization synchronization ) </programlisting> + + <para>Please refer to the SDK docs for information on other methods in + this class.</para> + + <para>The <classname>ITransactionSynchronization</classname> interface + is</para> + + <programlisting>public interface ITransactionSynchronization + { + + // Typically used by Spring resource management code + void Suspend(); + void Resume(); + + // Transaction lifeycyle callback methods + // Typically used by Spring resource management code but maybe useful in certain cases to application code + void BeforeCommit( bool readOnly ); + void AfterCommit(); + void BeforeCompletion(); + void AfterCompletion( TransactionSynchronizationStatus status ); + }</programlisting> + + <para>The <classname>TransactionSynchronizationStatus</classname> is an + enum with the values Committed, Rolledback, and Unknown.</para> + </sect1> </chapter> \ No newline at end of file Index: ado.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/ado.xml,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ado.xml 16 Jan 2008 17:21:44 -0000 1.22 --- ado.xml 24 Jan 2008 17:32:36 -0000 1.23 *************** *** 1966,1970 **** <para>This DAO method may be combined with other DAO operations inside a transactional context and they will all share the same ! connection/transaction objects. </para> <para>There are two overloads of the method ApplyConnectionAndTx which --- 1966,1970 ---- <para>This DAO method may be combined with other DAO operations inside a transactional context and they will all share the same ! connection/transaction objects.</para> <para>There are two overloads of the method ApplyConnectionAndTx which *************** *** 2157,2161 **** </sect2> ! <sect2> <title id="ado-storedproc">Stored Procedure</title> --- 2157,2161 ---- </sect2> ! <sect2 id="ado-stored-procedure"> <title id="ado-storedproc">Stored Procedure</title> *************** *** 2211,2215 **** to these methods can be a variable length argument list, in which case the order must match the parameter order of the stored procedure. If the ! argument is an IDictionary it contains parameter key/value pairs.</para> <para>The standard in/out parameters for the stored procedure can be set --- 2211,2217 ---- to these methods can be a variable length argument list, in which case the order must match the parameter order of the stored procedure. If the ! argument is an IDictionary it contains parameter key/value pairs. Return ! values from stored procedures are contained under the key ! "<literal>RETURN_VALUE</literal>".</para> <para>The standard in/out parameters for the stored procedure can be set *************** *** 2251,2255 **** you do not want to follow this loose shorthand convention, you can call the method <literal>QueryByNamesParameters</literal> instead passing in ! a IDictionary of parameter key/value pairs.</para> <para>The <classname>StoredProcedure</classname> class is threadsafe --- 2253,2260 ---- you do not want to follow this loose shorthand convention, you can call the method <literal>QueryByNamesParameters</literal> instead passing in ! a IDictionary of parameter key/value pairs. If you would like to have ! the return value of the stored procedure included in the returned ! dictionary, pass in <literal>true</literal> as a method parameter to ! <literal>DeriveParameters</literal>().</para> <para>The <classname>StoredProcedure</classname> class is threadsafe *************** *** 2263,2270 **** <classname>IResultSetExtractor</classname> callback interfaces via the <literal>AddRowCallback</literal> and ! <literal>AddResultSetExtractor</literal> methods. These apply to</para> ! ! <para>Return values from stored procedures are contained under the key ! "RETURN_VALUE".</para> <para>The generic version of StoredProcedure is in the namespace --- 2268,2272 ---- <classname>IResultSetExtractor</classname> callback interfaces via the <literal>AddRowCallback</literal> and ! <literal>AddResultSetExtractor</literal> methods.</para> <para>The generic version of StoredProcedure is in the namespace Index: objects.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/objects.xml,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** objects.xml 18 Jan 2008 17:39:43 -0000 1.116 --- objects.xml 24 Jan 2008 17:32:36 -0000 1.117 *************** *** 2817,2821 **** web-aware ApplicationContext).</para> ! <para> The scopes supported out of the box are listed below:</para> <table frame="all"> --- 2817,2821 ---- web-aware ApplicationContext).</para> ! <para>The scopes supported out of the box are listed below:</para> <table frame="all"> *************** *** 4174,4178 **** <classname>PropertyPlaceholderConfigurer</classname> refers to these two sections via a comma delimited list of section names in the ! <literal>configSections</literal> property.</para> <para>The <classname>PropertyPlaceholderConfigurer</classname> class --- 4174,4180 ---- <classname>PropertyPlaceholderConfigurer</classname> refers to these two sections via a comma delimited list of section names in the ! <literal>configSections</literal> property. If you are using section ! groups, prefix the section group name, for example ! myConfigSection/DaoConfiguraiton.</para> <para>The <classname>PropertyPlaceholderConfigurer</classname> class *************** *** 4400,4404 **** <para>The <classname>Spring.Objects.Factory.IFactoryObject</classname> interface is to be implemented by objects that <emphasis>are themselves ! factories</emphasis>. </para> <para>The <literal>IFactoryObject</literal> interface is a point of --- 4402,4406 ---- <para>The <classname>Spring.Objects.Factory.IFactoryObject</classname> interface is to be implemented by objects that <emphasis>are themselves ! factories</emphasis>.</para> <para>The <literal>IFactoryObject</literal> interface is a point of *************** *** 4433,4437 **** </itemizedlist></para> ! <para><classname>IFactoryObject</classname> </para> <para>The IFactoryObject concept and interface is used in a number of --- 4435,4439 ---- </itemizedlist></para> ! <para><classname>IFactoryObject</classname></para> <para>The IFactoryObject concept and interface is used in a number of *************** *** 5413,5417 **** creating the configuration metadata, i.e., implementations of RootObjectDefinition, etc. Note a web version of this application class ! has not yet been implemented. </para> <para>An example, with a<emphasis> yet to be created</emphasis> DLL --- 5415,5419 ---- creating the configuration metadata, i.e., implementations of RootObjectDefinition, etc. Note a web version of this application class ! has not yet been implemented.</para> <para>An example, with a<emphasis> yet to be created</emphasis> DLL Index: dbprovider.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/dbprovider.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** dbprovider.xml 16 Jan 2008 17:21:44 -0000 1.16 --- dbprovider.xml 24 Jan 2008 17:32:36 -0000 1.17 *************** *** 244,250 **** property DBPROVIDER_ADDITIONAL_RESOURCE_NAME in <classname>DbProviderFactory</classname> to a Spring resource location. ! The default value is <code>file://dbProviders.xml</code>. This crude ! mechanism will eventually be replaced with one based on a custom ! configuration section in App.config/Web.config.</para> <para>It may happen that the version number of an assembly you have --- 244,251 ---- property DBPROVIDER_ADDITIONAL_RESOURCE_NAME in <classname>DbProviderFactory</classname> to a Spring resource location. ! The default value is <code>file://dbProviders.xml</code>. (That isn't a ! typo, there is a difference in case with the name of the embedded ! resource). This crude mechanism will eventually be replaced with one based ! on a custom configuration section in App.config/Web.config.</para> <para>It may happen that the version number of an assembly you have |
From: Mark P. <mar...@us...> - 2008-01-24 17:29:20
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15447 Modified Files: HibernateTemplate.cs Log Message: SPRNET-853 - Throw HibernateSystemException (part of Spring's DAO exception hierarchy) when can not translate inner exception in NHibernate.ADOException Index: HibernateTemplate.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate/HibernateTemplate.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HibernateTemplate.cs 19 Sep 2007 22:58:22 -0000 1.2 --- HibernateTemplate.cs 24 Jan 2008 17:29:16 -0000 1.3 *************** *** 924,929 **** else { ! // Callback code throw application exception or other non DB related exception. ! throw; } } --- 924,928 ---- else { ! throw new HibernateSystemException(ex); } } |
From: Mark P. <mar...@us...> - 2008-01-24 17:29:17
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate12/Data/NHibernate/Generic In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15423 Modified Files: HibernateTemplate.cs Log Message: SPRNET-853 - Throw HibernateSystemException (part of Spring's DAO exception hierarchy) when can not translate inner exception in NHibernate.ADOException Index: HibernateTemplate.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate12/Data/NHibernate/Generic/HibernateTemplate.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HibernateTemplate.cs 19 Sep 2007 22:58:10 -0000 1.2 --- HibernateTemplate.cs 24 Jan 2008 17:29:09 -0000 1.3 *************** *** 1146,1151 **** else { ! // Callback code throw application exception or other non DB related exception. ! throw; } } --- 1146,1150 ---- else { ! throw new HibernateSystemException(ex); } } |
From: Mark P. <mar...@us...> - 2008-01-24 04:11:47
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Util In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9956 Modified Files: ReflectionUtils.cs Log Message: SPRNET-852 - Creating a custom attribute did not take into account public field values that match the named arguments in the attribute declaration. Index: ReflectionUtils.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Util/ReflectionUtils.cs,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** ReflectionUtils.cs 24 Jan 2008 04:10:36 -0000 1.56 --- ReflectionUtils.cs 24 Jan 2008 04:11:44 -0000 1.57 *************** *** 870,875 **** IList namedParameterValues = new ArrayList(); IList namedFieldValues = new ArrayList(); - //object[] namedParameterValues = new object[attributeData.NamedArguments.Count]; - //object[] namedFieldValues = new object[attributeData.NamedArguments.Count]; // Fill arrays of the constructor parameters --- 870,873 ---- |
From: Mark P. <mar...@us...> - 2008-01-24 04:10:47
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Util In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9488 Modified Files: ReflectionUtilsTests.cs Log Message: SPRNET-852 - Creating a custom attribute did not take into account public field values that match the named arguments in the attribute declaration. Index: ReflectionUtilsTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Util/ReflectionUtilsTests.cs,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ReflectionUtilsTests.cs 7 Dec 2007 17:59:51 -0000 1.20 --- ReflectionUtilsTests.cs 24 Jan 2008 04:10:44 -0000 1.21 *************** *** 25,31 **** using System.Reflection; using System.Reflection.Emit; using System.Threading; using System.Runtime.CompilerServices; ! using NUnit.Framework; --- 25,32 ---- using System.Reflection; using System.Reflection.Emit; + using System.Runtime.InteropServices; using System.Threading; using System.Runtime.CompilerServices; ! using System.Windows.Forms; using NUnit.Framework; *************** *** 312,316 **** --- 313,332 ---- // TODO : actually emit the attribute and check it... } + #if NET_2_0 + [Test] + public void CreatCustomAttriubtesFromCustomAttributeData() + { + Type control = typeof (Control); + MethodInfo mi = control.GetMethod("get_Font"); + System.Collections.Generic.IList<CustomAttributeData> attributes = CustomAttributeData.GetCustomAttributes(mi.ReturnParameter); + CustomAttributeBuilder builder = null; + foreach (CustomAttributeData customAttributeData in attributes) + { + builder = ReflectionUtils.CreateCustomAttribute(customAttributeData); + Assert.IsNotNull(builder); + } + } + #endif [Test] public void CreateCustomAttributeUsingDefaultValuesForTheConstructor() |
From: Mark P. <mar...@us...> - 2008-01-24 04:10:40
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Util In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9436 Modified Files: ReflectionUtils.cs Log Message: SPRNET-852 - Creating a custom attribute did not take into account public field values that match the named arguments in the attribute declaration. Index: ReflectionUtils.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Util/ReflectionUtils.cs,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** ReflectionUtils.cs 7 Dec 2007 17:59:20 -0000 1.55 --- ReflectionUtils.cs 24 Jan 2008 04:10:36 -0000 1.56 *************** *** 867,871 **** object[] parameterValues = new object[attributeData.ConstructorArguments.Count]; Type[] parameterTypes = new Type[attributeData.ConstructorArguments.Count]; ! object[] namedParameterValues = new object[attributeData.NamedArguments.Count]; // Fill arrays of the constructor parameters --- 867,875 ---- object[] parameterValues = new object[attributeData.ConstructorArguments.Count]; Type[] parameterTypes = new Type[attributeData.ConstructorArguments.Count]; ! ! IList namedParameterValues = new ArrayList(); ! IList namedFieldValues = new ArrayList(); ! //object[] namedParameterValues = new object[attributeData.NamedArguments.Count]; ! //object[] namedFieldValues = new object[attributeData.NamedArguments.Count]; // Fill arrays of the constructor parameters *************** *** 879,882 **** --- 883,888 ---- PropertyInfo[] attributeProperties = attributeType.GetProperties( BindingFlags.Instance | BindingFlags.Public); + FieldInfo[] attributeFields = attributeType.GetFields( + BindingFlags.Instance | BindingFlags.Public); // Not using generics bellow as probably Spring.NET tries to keep *************** *** 886,892 **** --- 892,905 ---- IList propertiesToSet = new ArrayList(); int k = 0; + + IList fieldsToSet = new ArrayList(); + int n = 0; + + // Fills arrays of the constructor named parameters foreach (CustomAttributeNamedArgument namedArgument in attributeData.NamedArguments) { + bool noMatchingProperty = false; + // Now iterate through all of the PropertyInfo, find the // one with the corresponding to the NamedProperty name *************** *** 897,901 **** { propertiesToSet.Add(attributeProperties[j]); ! namedParameterValues[k++] = ConvertValueIfNecessary(namedArgument.TypedValue.Value); break; } --- 910,914 ---- { propertiesToSet.Add(attributeProperties[j]); ! namedParameterValues.Add(ConvertValueIfNecessary(namedArgument.TypedValue.Value)); break; } *************** *** 905,908 **** --- 918,923 ---- { // In case of no match, throw + noMatchingProperty = true; + /* throw new InvalidOperationException( String.Format(CultureInfo.InvariantCulture, *************** *** 911,914 **** --- 926,954 ---- "on the attributeData {2}", namedArgument.MemberInfo.Name, attributeType.FullName, attributeData)); + */ + } + } + } + if (noMatchingProperty) + { + for (int j = 0; j < attributeFields.Length; j++) + { + if (attributeFields[j].Name == namedArgument.MemberInfo.Name) + { + fieldsToSet.Add(attributeFields[j]); + namedFieldValues.Add(ConvertValueIfNecessary(namedArgument.TypedValue.Value)); + break; + } + else + { + if (j == attributeFields.Length - 1) + { + throw new InvalidOperationException( + String.Format(CultureInfo.InvariantCulture, + "A property or public field with name {0} can't be found in the " + + "type {1}, but is present as a named property " + + "on the attributeData {2}", namedArgument.MemberInfo.Name, + attributeType.FullName, attributeData)); + } } } *************** *** 921,926 **** propertiesToSet.CopyTo(namedProperties, 0); ! return new CustomAttributeBuilder( ! constructor, parameterValues, namedProperties, namedParameterValues); } --- 961,986 ---- propertiesToSet.CopyTo(namedProperties, 0); ! object[] propertyValues = new object[namedParameterValues.Count]; ! namedParameterValues.CopyTo(propertyValues,0); ! ! if (fieldsToSet.Count == 0) ! { ! return new CustomAttributeBuilder( ! constructor, parameterValues, namedProperties, propertyValues); ! } ! else ! { ! FieldInfo[] namedFields = new FieldInfo[fieldsToSet.Count]; ! fieldsToSet.CopyTo(namedFields, 0); ! ! object[] fieldValues = new object[namedFieldValues.Count]; ! namedFieldValues.CopyTo(fieldValues, 0); ! ! return new CustomAttributeBuilder( ! constructor, parameterValues, namedProperties, propertyValues, namedFields, fieldValues); ! } ! ! ! } |
From: Mark P. <mar...@us...> - 2008-01-23 03:35:25
|
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13106 Modified Files: dao.xml Log Message: additional details on how to customize error code to dao exception translation. Index: dao.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/dao.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dao.xml 16 Jan 2008 17:21:44 -0000 1.4 --- dao.xml 23 Jan 2008 03:35:10 -0000 1.5 *************** *** 104,132 **** <literal>ErrorCodeExceptionTranslator</literal>, is provided that uses the error codes defined for each data provider in the file dbproviders.xml. ! Refer to this file for the exact mappings of error codes to Spring ! DataAccessExceptions. <classname>ErrorCodeExceptionTranslator</classname> ! allows you to customize the mapping behavior without having customize the ! <classname>IDbProvider</classname> metadata (typically in dbproviders.xml ! but can also be defined in an external location). .You can subclass ! <classname>ErrorCodeExceptionTranslator</classname> and override the ! method, <literal>DataAccessException TranslateException(string task, ! string sql, string errorCode, Exception exception)</literal>. This will be ! called before referencing the metadata to perform exception translation. ! The property <literal>ExceptionTranslator</literal> on ! <literal>AdoTemplate</literal> and <literal>HibernateTemplate</literal> ! lets you use your own custom implementation.</para> ! <para>You can use this API directly in your own Spring independent data ! layer. If you are using Spring's ADO.NET abstraction class, ! <literal>AdoTemplate</literal>, or <literal>HibernateTemplate</literal>, ! the converted exceptions will be thrown automatically. Somewhere in ! between these two cases is using Spring's declarative transaction ! management features in .NET 2.0 with the raw ADO.NET APIs and using ! <literal>IAdoExceptionTranslator</literal> in your exception handling ! layer (which might be implemented in AOP using Spring's exception ! translation aspect).</para> ! <para>Some of the more common exceptions are described here. Please refer ! to the API documentation for more details.</para> <table> --- 104,195 ---- <literal>ErrorCodeExceptionTranslator</literal>, is provided that uses the error codes defined for each data provider in the file dbproviders.xml. ! Refer to this file, an embedded resource in the Spring.Data assembly, for ! the exact mappings of error codes to Spring DataAccessExceptions. </para> ! <para>A common need is to modify the error codes that are map onto the ! exception hierarchy. There are several ways to accomplish this task. ! </para> ! <para>One approach is to override the error codes that are defined in ! <code>assembly://Spring.Data/Spring.Data.Common/dbproviders.xml</code>. By ! default, the <link ! linkend="dbprovider-dbprovider">DbProviderFactory</link> will look for ! additional metadata for the IoC container it uses internally to define and ! manage the DbProviders in a file named <literal>dbProviders.xml</literal> ! located in the root runtime directory. (You can change this location, see ! the documentation on <link lang="" ! linkend="dbprovider-dbprovider">DbProvider</link> for more information.) ! This is a standard Spring application context so all features, such as ! <link ! linkend="objects-factory-customizing-factory-postprocessors">ObjectFactoryPostProcessors</link> ! are available and will be automatically applied. Defining a <link ! linkend="objects-factory-overrideconfigurer">PropertyOverrideConfigurer</link> ! in this additional configuration file will allow for you to override ! specific property values defined in the embedded resource file. As an ! example, the additional <literal>dbProviders.xml</literal> file shown ! below will add the error code <literal>2601</literal> to the list of error ! codes that map to a ! <literal>DataIntegrityViolationException</literal>.</para> ! ! <para><programlisting><objects xmlns='http://www.springframework.net'> ! ! <alias name='SqlServer-2.0' alias='SqlServer2005'/> ! ! <object name="appConfigPropertyOverride" type="Spring.Objects.Factory.Config.PropertyOverrideConfigurer, Spring.Core"> ! <property name="Properties"> ! <name-values> ! <add key="SqlServer2005.DbMetadata.ErrorCodes.DataIntegrityViolationCodes" ! value="544,2601,2627,8114,8115"/> ! </name-values> ! </property> ! </object> ! ! </objects></programlisting>The reason to define the alias is that <link ! linkend="objects-factory-overrideconfigurer">PropertyOverrideConfigurer</link> ! assumes a period <literal>(.)</literal> as the separator to pick out the ! object name but the names of the objects in ! <literal>dbProviders.xml</literal> have periods in them (i.e. ! SqlServer-2.0 or System.Data.SqlClient). Creating an alias that has no ! periods in the name is a workaround. </para> ! ! <para>Another way to customize the mappings of error codes to exceptions ! is to subclass <classname>ErrorCodeExceptionTranslator</classname> and ! override the method, <literal>DataAccessException ! TranslateException(string task, string sql, string errorCode, Exception ! exception)</literal>. This will be called before referencing the metadata ! to perform exception translation. The vendor specific error code provided ! as a method argument has already been parsed out of the raw ADO.NET ! exception. If you create your own specific subclass, then you should set ! the property <literal>ExceptionTranslator</literal> on ! <literal>AdoTemplate</literal> and ! <literal>HibernateTemplate/HibernateTransactionManager</literal> to refer ! to your custom implementation (unless you are using autowiring).</para> ! ! <para>The third way is to write an implementation of ! <literal>IAdoExceptionTranslator</literal> and set the property ! <literal>FallbackTranslator</literal>'on ! <literal>ErrorCodeExceptionTranslator</literal>. In this case you are ! responsible for parsing our the vendor specific error code from the raw ! ADO.NET exception. As with the case of subclassing ! ErrorCodeExceptionTranslator, you will need to refer to this custom ! exception translator when using <literal>AdoTemplate</literal> or ! <literal>HibernateTemplate/HibernateTransactionManager</literal>.</para> ! ! <para>The ordering of the exception translation processing is as follows. ! The method TranslateException is called first, then the standard exception ! translation logic, then the FallbackTranslator. </para> ! ! <para>Note that you can use this API directly in your own Spring ! independent data layer. If you are using Spring's ADO.NET abstraction ! class, <literal>AdoTemplate</literal>, or ! <literal>HibernateTemplate</literal>, the converted exceptions will be ! thrown automatically. Somewhere in between these two cases is using ! Spring's declarative transaction management features in .NET 2.0 with the ! raw ADO.NET APIs and using <literal>IAdoExceptionTranslator</literal> in ! your exception handling layer (which might be implemented in AOP using ! Spring's exception translation aspect).</para> ! ! <para>Some of the more common data access exceptions are described here. ! Please refer to the API documentation for more details.</para> <table> |
From: Erich E. <oak...@us...> - 2008-01-21 07:04:51
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Data/Spring/Web/Support/PageHandlerFactoryTests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv733/Data/Spring/Web/Support/PageHandlerFactoryTests Modified Files: Web.Config.net-1.1 Web.Config.net-2.0 Added Files: .cvsignore Log Message: prepared for SPRNET-838 --- NEW FILE: .cvsignore --- bin Index: Web.Config.net-2.0 =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Data/Spring/Web/Support/PageHandlerFactoryTests/Web.Config.net-2.0,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Web.Config.net-2.0 5 Dec 2007 08:30:21 -0000 1.2 --- Web.Config.net-2.0 21 Jan 2008 07:04:46 -0000 1.3 *************** *** 14,17 **** --- 14,42 ---- </configSections> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <!-- + <dependentAssembly> + <assemblyIdentity name="Common.Logging" publicKeyToken="65e474d141e25e07" /> + <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.2.0" /> + <assemblyIdentity name="Common.Logging" publicKeyToken="af08829b84f0328e" /> + <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.2.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="nunit.core" publicKeyToken="96d09a1eb7f44a77" /> + <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.4.5.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="nunit.core.interfaces" publicKeyToken="96d09a1eb7f44a77" /> + <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.4.5.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" /> + <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.4.5.0" /> + </dependentAssembly> + --> + </assemblyBinding> + </runtime> + <!-- to see logging output in the attached debugger --> <common> *************** *** 35,39 **** <httpHandlers> ! <add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/> <add verb="*" path="*.testmethod" type="NUnitAspEx.AspTestMethodHandler, NUnitAspEx" validate="false" /> </httpHandlers> --- 60,65 ---- <httpHandlers> ! <add verb="*" path="*.oaspx" type="System.Web.UI.PageHandlerFactory"/> ! <add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/> <add verb="*" path="*.testmethod" type="NUnitAspEx.AspTestMethodHandler, NUnitAspEx" validate="false" /> </httpHandlers> Index: Web.Config.net-1.1 =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Data/Spring/Web/Support/PageHandlerFactoryTests/Web.Config.net-1.1,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Web.Config.net-1.1 3 Dec 2007 16:11:32 -0000 1.1 --- Web.Config.net-1.1 21 Jan 2008 07:04:46 -0000 1.2 *************** *** 35,39 **** <httpHandlers> ! <add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/> <add verb="*" path="*.testmethod" type="NUnitAspEx.AspTestMethodHandler, NUnitAspEx" validate="false" /> </httpHandlers> --- 35,40 ---- <httpHandlers> ! <add verb="*" path="*.oaspx" type="System.Web.UI.PageHandlerFactory"/> ! <add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/> <add verb="*" path="*.testmethod" type="NUnitAspEx.AspTestMethodHandler, NUnitAspEx" validate="false" /> </httpHandlers> |
From: Erich E. <oak...@us...> - 2008-01-21 07:04:51
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv733/TestSupport Modified Files: TestWebContext.cs Log Message: prepared for SPRNET-838 Index: TestWebContext.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport/TestWebContext.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestWebContext.cs 28 Nov 2007 23:26:27 -0000 1.2 --- TestWebContext.cs 21 Jan 2008 07:04:46 -0000 1.3 *************** *** 24,27 **** --- 24,28 ---- using System.Collections.Specialized; using System.IO; + using System.Threading; using System.Web; using System.Web.Hosting; *************** *** 37,46 **** { private TextWriter _out; ! public TestWebContext(string virtualPath, string page) { _out = new StringWriter(); ! string physDir = AppDomain.CurrentDomain.BaseDirectory + "\\"; ! HttpWorkerRequest wr = new SimpleWorkerRequest(virtualPath, physDir, page, string.Empty, _out); HttpContext ctx = new HttpContext(wr); HttpContext.Current = ctx; --- 38,56 ---- { private TextWriter _out; ! private HttpWorkerRequest _wr; ! public TestWebContext(string virtualPath, string page) { _out = new StringWriter(); ! HttpWorkerRequest wr; ! if (Thread.GetDomain().GetData(".appPath") != null) ! { ! wr = new SimpleWorkerRequest(page, string.Empty, _out); ! } ! else ! { ! string physDir = AppDomain.CurrentDomain.BaseDirectory + "\\"; ! wr = new SimpleWorkerRequest(virtualPath, physDir, page, string.Empty, _out); ! } HttpContext ctx = new HttpContext(wr); HttpContext.Current = ctx; *************** *** 51,54 **** --- 61,70 ---- #endif ctx.Request.Browser = browser; + _wr = wr; + } + + public HttpWorkerRequest HttpWorkerRequest + { + get { return _wr; } } |
From: Erich E. <oak...@us...> - 2008-01-21 07:04:49
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv733/Web/Support Modified Files: PageHandlerFactoryTests.cs Log Message: prepared for SPRNET-838 Index: PageHandlerFactoryTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/Support/PageHandlerFactoryTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PageHandlerFactoryTests.cs 5 Dec 2007 08:30:30 -0000 1.2 --- PageHandlerFactoryTests.cs 21 Jan 2008 07:04:46 -0000 1.3 *************** *** 21,24 **** --- 21,26 ---- #region Imports + using System; + using System.Web; using NUnit.Extensions.Asp.AspTester; using NUnit.Framework; *************** *** 60,63 **** --- 62,83 ---- } + [Test] + public void BCLPageFactoryThrowsHttp404() + { + using (TestWebContext ctx = new TestWebContext("/Test", "/DoesNotExist.oaspx")) + { + try + { + IHttpHandlerFactory phf = (IHttpHandlerFactory)Activator.CreateInstance(typeof(System.Web.UI.Page).Assembly.GetType("System.Web.UI.PageHandlerFactory"), true); + phf.GetHandler(HttpContext.Current, "GET", ctx.HttpWorkerRequest.GetFilePath(), ctx.HttpWorkerRequest.GetFilePathTranslated()); + } + catch (HttpException e) + { + Assert.AreEqual( 404, e.GetHttpCode() ); + Assert.IsTrue( e.Message.IndexOf(ctx.HttpWorkerRequest.GetFilePath()) > 0); + } + } + } + #if NET_2_0 [Test] |
From: Erich E. <oak...@us...> - 2008-01-21 06:39:16
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26568/Spring.Data.NHibernate/Data/NHibernate/Support Modified Files: OpenSessionInViewModule.cs SessionScope.cs Log Message: SPRNET-845 Index: OpenSessionInViewModule.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate/Support/OpenSessionInViewModule.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OpenSessionInViewModule.cs 29 Sep 2007 21:29:23 -0000 1.6 --- OpenSessionInViewModule.cs 21 Jan 2008 06:39:12 -0000 1.7 *************** *** 43,47 **** /// but does not yet associate a session with a thread, that is lef to the lifecycle of the request. /// </summary> ! public OpenSessionInViewModule() : base("appSettings", false) { --- 43,47 ---- /// but does not yet associate a session with a thread, that is lef to the lifecycle of the request. /// </summary> ! public OpenSessionInViewModule() : base("appSettings", typeof(OpenSessionInViewModule), false) { Index: SessionScope.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate/Support/SessionScope.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SessionScope.cs 22 Aug 2007 20:16:36 -0000 1.2 --- SessionScope.cs 21 Jan 2008 06:39:12 -0000 1.3 *************** *** 120,128 **** /// </param> public SessionScope(string sectionName, bool open) ! : this( new ConfigSectionSessionScopeSettings(new StackFrame(1).GetMethod().DeclaringType, sectionName), open) { // noop } /// <summary> /// Initializes a new instance of the <see cref="SessionScope"/> class. --- 120,148 ---- /// </param> public SessionScope(string sectionName, bool open) ! : this( sectionName, typeof(SessionScope), open) { // noop } + + /// <summary> + /// Initializes a new instance of the <see cref="SessionScope"/> class. + /// </summary> + /// <param name="sectionName"> + /// The name of the configuration section to read configuration settings from. + /// See <see cref="ConfigSectionSessionScopeSettings"/> for more info. + /// </param> + /// <param name="namespaceType">The type, who's full name is used for prefixing appSetting keys</param> + /// <param name="open"> + /// If set to <c>true</c> associate a session with the thread. If false, another + /// collaborating class will associate the session with the thread, potentially by calling + /// the Open method on this class. + /// </param> + public SessionScope(string sectionName, Type namespaceType, bool open) + : this(new ConfigSectionSessionScopeSettings(namespaceType, sectionName), open) + { + // noop + } + /// <summary> /// Initializes a new instance of the <see cref="SessionScope"/> class. |
From: Erich E. <oak...@us...> - 2008-01-21 06:20:33
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18148/App_Data Modified Files: NORTHWND.MDF northwnd_log.LDF Log Message: SPRNET-772: changed northwind sample to use local sqlexpress instance Index: northwnd_log.LDF =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data/northwnd_log.LDF,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsGtFA8I and /tmp/cvsCERz6I differ Index: NORTHWND.MDF =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data/NORTHWND.MDF,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsUQ25PP and /tmp/cvsaKvwiQ differ |
From: Erich E. <oak...@us...> - 2008-01-21 05:37:34
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3042 Modified Files: Web.config Log Message: SPRNET-772: changed northwind sample to use local sqlexpress instance Index: Web.config =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/Web.config,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Web.config 29 Sep 2007 21:32:08 -0000 1.6 --- Web.config 21 Jan 2008 05:37:29 -0000 1.7 *************** *** 43,47 **** <!-- These properties are referenced in Dao.xml --> <databaseSettings> ! <add key="db.datasource" value="(local);Integrated Security=true"/> <add key="db.user" value="springqa"/> <add key="db.password" value="springqa"/> --- 43,47 ---- <!-- These properties are referenced in Dao.xml --> <databaseSettings> ! <add key="db.datasource" value="(local)\SQLEXPRESS; Integrated Security=true; AttachDbFilename=|DataDirectory|northwnd.mdf; User Instance=true;"/> <add key="db.user" value="springqa"/> <add key="db.password" value="springqa"/> |
From: Erich E. <oak...@us...> - 2008-01-21 05:37:33
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3042/App_Data Added Files: NORTHWND.MDF northwnd_log.LDF Log Message: SPRNET-772: changed northwind sample to use local sqlexpress instance --- NEW FILE: northwnd_log.LDF --- (This appears to be a binary file; contents omitted.) --- NEW FILE: NORTHWND.MDF --- (This appears to be a binary file; contents omitted.) |
From: Erich E. <oak...@us...> - 2008-01-21 05:31:15
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1676/App_Data Log Message: Directory /cvsroot/springnet/Spring.Net/examples/Spring/Spring.Data.NHibernate.Northwind/src/Spring.Northwind.Web/App_Data added to the repository |
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31288 Modified Files: ado.xml ajax.xml aop-aspect-library.xml aop-quickstart.xml aop.xml dao.xml data-quickstart.xml dbprovider.xml expressions.xml index.xml javadevelopers.xml logging.xml migration.xml navigation.xml objects-misc.xml objects.xml orm.xml overview.xml pool.xml psa-intro.xml quickstarts.xml remoting-quickstart.xml remoting.xml resources.xml services.xml springair.xml testing.xml threading.xml transaction.xml tx-quickstart.xml validation.xml vsnet.xml web.xml webservices.xml xml-config-reference.xml Log Message: Thank you Ruben for your edits! Index: webservices.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/webservices.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** webservices.xml 20 Dec 2007 23:28:28 -0000 1.16 --- webservices.xml 16 Jan 2008 17:21:44 -0000 1.17 *************** *** 84,88 **** <classname>WebMethod</classname> attribute and (at the class-level) the <classname>WebService</classname> attribute. Application developers can ! create this web service within Visual Studio.NET just like any other class.</para> --- 84,88 ---- <classname>WebMethod</classname> attribute and (at the class-level) the <classname>WebService</classname> attribute. Application developers can ! create this web service within Visual Studio just like any other class.</para> *************** *** 130,137 **** service object internally for each request, all Spring.NET needs to provide is the <classname>System.Type</classname> of the service class, ! which can be retrieved from the object definition even if it is amrked as <literal>abstract</literal>.</para> ! <para>That's pretty much it as can access this web service using the value specified for the <literal>name</literal> attribute of the object definition as the service name:</para> --- 130,137 ---- service object internally for each request, all Spring.NET needs to provide is the <classname>System.Type</classname> of the service class, ! which can be retrieved from the object definition even if it is marked as <literal>abstract</literal>.</para> ! <para>That's pretty much it as we can access this web service using the value specified for the <literal>name</literal> attribute of the object definition as the service name:</para> *************** *** 184,189 **** </programlisting> ! <para>The problem with standard SpringNET DI usage in this case is that ! Spring.NEt does not control the instantiation of the web service. This happens deep in the internals of the .NET framework, thus making it quite difficult to plug in the code that will perform the --- 184,189 ---- </programlisting> ! <para>The problem with standard Spring.NET DI usage in this case is that ! Spring.NET does not control the instantiation of the web service. This happens deep in the internals of the .NET framework, thus making it quite difficult to plug in the code that will perform the *************** *** 251,255 **** exported interfaces.</para> ! <para>However, that is still not the ideal solution. You would looe information that the optional <classname>WebService</classname> and <classname>WebMethod</classname> attributes provide, such as service --- 251,255 ---- exported interfaces.</para> ! <para>However, that is still not the ideal solution. You would lose information that the optional <classname>WebService</classname> and <classname>WebMethod</classname> attributes provide, such as service *************** *** 260,264 **** <para>A second, better way, is to set all the necessary values within ! the definoitn of the service exporter, like so...</para> <programlisting> --- 260,264 ---- <para>A second, better way, is to set all the necessary values within ! the definition of the service exporter, like so...</para> <programlisting> *************** *** 310,314 **** Distributed computing principles still apply and you need to make sure that your services are not chatty and that arguments and return values ! are serializable.</para> <para>You still need to exercise common sense when deciding whether to --- 310,314 ---- Distributed computing principles still apply and you need to make sure that your services are not chatty and that arguments and return values ! are Serializable.</para> <para>You still need to exercise common sense when deciding whether to *************** *** 381,386 **** service implementation or a local service instead of a web service.</para> ! <para>The goal for Spring.NET's web sevices support is to enable the easy ! generation of the client-side proxies that implement a specific service interface.</para> --- 381,386 ---- service implementation or a local service instead of a web service.</para> ! <para>The goal for Spring.NET's web services support is to enable the easy ! generation of client-side proxies that implement a specific service interface.</para> *************** *** 442,454 **** <classname>WebServiceExporter</classname>, which requires an interface in order to work.</para> - </sect2> <sect2> ! <title>Generating proxy dynamically</title> <para>The <classname>WebServiceProxyFactory</classname> can also dynamically generate a web-service proxy. The XML object definition for ! this factoroy object is shown below</para> <programlisting> --- 442,453 ---- <classname>WebServiceExporter</classname>, which requires an interface in order to work.</para> </sect2> <sect2> ! <title>Generating proxies dynamically</title> <para>The <classname>WebServiceProxyFactory</classname> can also dynamically generate a web-service proxy. The XML object definition for ! this factory object is shown below</para> <programlisting> *************** *** 470,479 **** typed data sets through a web service. Leaving the pros and cons of this approach aside, the current behavior of the proxy generator in .NET is ! to create wrapper types for the typed dataset. This not only polutes the ! solution with extraneous classes but also results in multiple wrapper ! types being created, one for each web service that uses the typed ! dataset. This can quickly get confusing. The proxy created by Spring ! allows you to reference you typed datasets directly, avoiding the above ! mentioned issues.</para> </sect2> --- 469,478 ---- typed data sets through a web service. Leaving the pros and cons of this approach aside, the current behavior of the proxy generator in .NET is ! to create wrapper types for the typed dataset. This not only pollutes ! the solution with extraneous classes but also results in multiple ! wrapper types being created, one for each web service that uses the ! typed dataset. This can quickly get confusing. The proxy created by ! Spring allows you to reference you typed datasets directly, avoiding the ! above mentioned issues.</para> </sect2> *************** *** 481,493 **** <title>Configuring the proxy instance</title> ! <para> ! The <classname>WebServiceProxyFactory</classname> also implements ! the interface, ! <classname>Spring.Objects.Factory.IConfigurableFactoryObject</classname>, ! allowing to specify configuration for the product that the ! <classname>WebServiceProxyFactory</classname> creates. This is done by ! specifying the ProductTemplate property. This is particularly useful for ! securing the web service. An example is shown below. ! </para> <programlisting> --- 480,490 ---- <title>Configuring the proxy instance</title> ! <para>The <classname>WebServiceProxyFactory</classname> also implements ! the interface, ! <classname>Spring.Objects.Factory.IConfigurableFactoryObject</classname>, ! allowing to specify configuration for the product that the ! <classname>WebServiceProxyFactory</classname> creates. This is done by ! specifying the ProductTemplate property. This is particularly useful for ! securing the web service. An example is shown below.</para> <programlisting> *************** *** 506,510 **** </object> </property> ! <emphasis role="bold"><!-- Configure client certficiate for the web service --> </emphasis> <property name="ClientCertificates"> <list> --- 503,507 ---- </object> </property> ! <emphasis role="bold"><!-- Configure client certificate for the web service --> </emphasis> <property name="ClientCertificates"> <list> Index: objects-misc.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/objects-misc.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** objects-misc.xml 4 Dec 2006 08:09:07 -0000 1.3 --- objects-misc.xml 16 Jan 2008 17:21:44 -0000 1.4 *************** *** 5,11 **** <sect1 id="objects-misc-introduction"> <title>Introduction</title> - - <para><emphasis>(Available in 1.0)</emphasis></para> - <para>The concepts encapsulated by the <classname>IObjectWrapper</classname> interface are fundamental to the --- 5,8 ---- *************** *** 60,64 **** <para>The aforementioned <methodname>SetPropertyValue()</methodname> and ! <methodname>GetPropertyValue()</methodname> methods do have a number of conventions for indicating the path of a property. A property path is an expression that implementations of the --- 57,61 ---- <para>The aforementioned <methodname>SetPropertyValue()</methodname> and ! <methodname>GetPropertyValue()</methodname> methods have a number of conventions for indicating the path of a property. A property path is an expression that implementations of the *************** *** 370,374 **** <entry>Capable of resolving a string representation of a URI to ! an actual <literal>URI</literal>-object.</entry> </row> --- 367,371 ---- <entry>Capable of resolving a string representation of a URI to ! an actual <literal>Uri</literal>-object.</entry> </row> *************** *** 405,409 **** <row> ! <entry><literal>RGBColorConverter</literal></entry> <entry>Capable of resolving a comma separated list of Red, --- 402,406 ---- <row> ! <entry><literal>RgbColorConverter</literal></entry> <entry>Capable of resolving a comma separated list of Red, *************** *** 416,420 **** <entry>Converts string representation of regular expression into ! an instance of System.Text.RegularExpressions RegEx</entry> </row> </tbody> --- 413,417 ---- <entry>Converts string representation of regular expression into ! an instance of System.Text.RegularExpressions.Regex</entry> </row> </tbody> *************** *** 426,429 **** --- 423,438 ---- checking any configuration files associated with your application, checking the Global Assembly Cache (GAC), and assembly probing.</para> + + <sect2> + <title>Custom type converters</title> + + <para>You can register a custom type converter either Programatically + using the class TypeConverterRegistry or through configuration of + Spring's container and described in the section <link + linkend="context-type-converters">Registering Type + Converters</link>.</para> + + <para></para> + </sect2> </sect1> </chapter> \ No newline at end of file Index: vsnet.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/vsnet.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** vsnet.xml 20 Dec 2007 16:33:52 -0000 1.12 --- vsnet.xml 16 Jan 2008 17:21:44 -0000 1.13 *************** *** 10,14 **** ! <para>Most of this section is well traveled territory for those familiar with editing XML files in their favorite XML editor. The XML configuration data that defines the objects that Spring will manage for you are --- 10,14 ---- ! <para>Most of this section is well travelled territory for those familiar with editing XML files in their favorite XML editor. The XML configuration data that defines the objects that Spring will manage for you are *************** *** 32,36 **** </spring></programlisting> ! The VS.NET 2005 XML editor can use the attribute <literal>xsi:schemaLocation</literal> --- 32,36 ---- </spring></programlisting> ! The VS.NET 2005 XML editor can use the attribute <literal>xsi:schemaLocation</literal> *************** *** 40,44 **** <literal>xsi:schemaLocation</literal> ! element. If you reference the Spring.NET XML schema as shown below, you can get IntelliSense and validation support while editing a Spring configuration file in VS.NET 2005. In order to get this functionality in VS.NET 2002/2003 you you will need to register the schema with VS.NET or include the schema as part of your application project. <programlisting><?xml version="1.0" encoding="UTF-8"?> --- 40,44 ---- <literal>xsi:schemaLocation</literal> ! element. If you reference the Spring.NET XML schema as shown below, you can get intellisense and validation support while editing a Spring configuration file in VS.NET 2005. In order to get this functionality in VS.NET 2002/2003 you will need to register the schema with VS.NET or include the schema as part of your application project. <programlisting><?xml version="1.0" encoding="UTF-8"?> *************** *** 65,69 **** <para><literal>C:\Program Files\Microsoft Visual Studio .NET ! 2003\Common7\Packages\schemas\xml</literal> for VS.NET 2003</para> --- 65,69 ---- <para><literal>C:\Program Files\Microsoft Visual Studio .NET ! 2003\Common7\Packages\schemas\xml</literal> for VS 2003</para> *************** *** 91,95 **** <para>Spring's .xsd schemas are located in the directory doc/schema. In that directory is also a NAnt build file to help copy over the .xsd files ! to the appropriate VS.NET locations. To execute this scripte simply type '<literal>nant</literal>' in the doc/schema directory.</para> --- 91,95 ---- <para>Spring's .xsd schemas are located in the directory doc/schema. In that directory is also a NAnt build file to help copy over the .xsd files ! to the appropriate VS.NET locations. To execute this script simply type '<literal>nant</literal>' in the doc/schema directory.</para> *************** *** 117,122 **** <para>Once registered, the namespace declaration alone is sufficient to ! get IntelliSense and validation of the configuration file from within ! VS.NET. Alternatively, you can select xsd file to use by setting the targetSchema property in the Property Sheet for the configuration file.</para> --- 117,122 ---- <para>Once registered, the namespace declaration alone is sufficient to ! get intellisense and validation of the configuration file from within ! VS.NET. Alternatively, you can select the .xsd file to use by setting the targetSchema property in the Property Sheet for the configuration file.</para> *************** *** 126,131 **** <para>As shown in the section <xref linkend="objects-factory-client" /> Spring.NET supports using .NET's application configuration file as the ! location to store the object defintions that will be managed by the object ! factory.</para> --- 126,131 ---- <para>As shown in the section <xref linkend="objects-factory-client" /> Spring.NET supports using .NET's application configuration file as the ! location to store the object definitions that will be managed by the ! object factory.</para> *************** *** 159,167 **** <para>In this case VS.NET 2002/2003 will still provide you with ! IntelliSense help but you will not be able to fully validate the document as the entire schema for App.config is not known. To be able to validate this document one would need to install the <ulink url="http://www.radsoftware.com.au/articles/intellisensewebconfig.aspx">.NET ! Configuration File schema</ulink> and and addition schema that incorporates the <literal><spring></literal> and <literal><context></literal> section in addition to the --- 159,167 ---- <para>In this case VS.NET 2002/2003 will still provide you with ! intellisense help but you will not be able to fully validate the document as the entire schema for App.config is not known. To be able to validate this document one would need to install the <ulink url="http://www.radsoftware.com.au/articles/intellisensewebconfig.aspx">.NET ! Configuration File schema</ulink> and an additional schema that incorporates the <literal><spring></literal> and <literal><context></literal> section in addition to the *************** *** 176,180 **** ! <para>Keep these tradeoffs in mind as you decide where to place the bulk of your configuration information. Conventional wisdom is do quick prototyping with App.config and use another IResource location, file or --- 176,180 ---- ! <para>Keep these trade offs in mind as you decide where to place the bulk of your configuration information. Conventional wisdom is do quick prototyping with App.config and use another IResource location, file or *************** *** 199,204 **** <para>Spring provides API documentation that can be integrated within Visual Studio. There are two versions of the documentation, one for VS.NET ! 2002/2003 and the other for VS.NET 2005. They differ only in the format ! applied, VS.NET 2005 using the sexy new format. Enjoy!</para> </sect1> </chapter> \ No newline at end of file --- 199,204 ---- <para>Spring provides API documentation that can be integrated within Visual Studio. There are two versions of the documentation, one for VS.NET ! 2002/2003 and the other for VS 2005. They differ only in the format ! applied, VS 2005 using the sexy new format. Enjoy!</para> </sect1> </chapter> \ No newline at end of file Index: expressions.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/expressions.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** expressions.xml 7 Dec 2006 06:50:25 -0000 1.9 --- expressions.xml 16 Jan 2008 17:21:44 -0000 1.10 *************** *** 4,39 **** <sect1 id="expressions-introduction"> <title>Introduction</title> ! <para> ! The Spring.Expressions namespace provides a powerful expression language for ! querying and manipulating an object graph at runtime. The language supports setting and ! getting of property values, property assignment, method invocation, ! accessing the context of arrays, collections and indexers, ! logical and arithmetic operators, named variables, ! and retrieval of objects by name from Spring's IoC container. ! It also supports list projection and selection, as well as common list aggregators.</para> [...1260 lines suppressed...] --- 978,982 ---- Inventor pupin = new Inventor("Mihajlo Pupin", new DateTime(1854, 10, 9), "Serbian"); ! pupin.Inventions = new string[] {"Long distance telephony & telegraphy", "Secondary X-Ray radiation", "Sonar"}; pupin.PlaceOfBirth.City = "Idvor"; pupin.PlaceOfBirth.Country = "Serbia"; *************** *** 650,654 **** ieee.Members.Add(pupin); ieee.Officers["president"] = pupin; ! ieee.Officers["advisors"] = new Inventor[] {tesla, pupin};]]></programlisting> </sect1> ! </chapter> --- 986,990 ---- ieee.Members.Add(pupin); ieee.Officers["president"] = pupin; ! ieee.Officers["advisors"] = new Inventor[] {tesla, pupin};</programlisting> </sect1> ! </chapter> \ No newline at end of file Index: aop-aspect-library.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/aop-aspect-library.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** aop-aspect-library.xml 13 Oct 2007 22:34:10 -0000 1.10 --- aop-aspect-library.xml 16 Jan 2008 17:21:44 -0000 1.11 *************** *** 10,15 **** module. However, the aspects that are documented in this section are those contained within the Spring.Aop module itself. The aspects in within ! Spring.Aop.dll are are Caching, Exception Handling, Logging, and Retry. ! Other traditional advice types such as validation, security, and thread management, will be included in a future release.</para> </sect1> --- 10,15 ---- module. However, the aspects that are documented in this section are those contained within the Spring.Aop module itself. The aspects in within ! Spring.Aop.dll are Caching, Exception Handling, Logging, and Retry. Other ! traditional advice types such as validation, security, and thread management, will be included in a future release.</para> </sect1> *************** *** 40,44 **** ASP.NET cache and a simple implementation, <classname>Spring.Caching.NonExpiringCache</classname> that stores cache ! entries in memory and never expires these entries. Custom implementation based on 3rd party implementations, such as Oracle Coherence, or memcached, can be used by implementing the <literal>ICache</literal> --- 40,44 ---- ASP.NET cache and a simple implementation, <classname>Spring.Caching.NonExpiringCache</classname> that stores cache ! entries in memory and never expires these entries. Custom implementations based on 3rd party implementations, such as Oracle Coherence, or memcached, can be used by implementing the <literal>ICache</literal> *************** *** 91,95 **** <listitem> ! <para><literal>Key</literal> - an string representing a Spring Expression Language (SpEL) expression used as the key in the cache.</para> --- 91,95 ---- <listitem> ! <para><literal>Key</literal> - a string representing a Spring Expression Language (SpEL) expression used as the key in the cache.</para> *************** *** 120,124 **** <listitem> <para><literal>SlidingExperation</literal> - If this property value is ! set to true, every time the marked object is accessed it'sTimeToLive value is reset to its original value</para> </listitem> --- 120,124 ---- <listitem> <para><literal>SlidingExperation</literal> - If this property value is ! set to true, every time the marked object is accessed it's TimeToLive value is reset to its original value</para> </listitem> *************** *** 150,154 **** <listitem> ! <para><literal>High</literal> - low likelihood of deletion when cache is purged.</para> </listitem> --- 150,154 ---- <listitem> ! <para><literal>High</literal> - high likelihood of deletion when cache is purged.</para> </listitem> *************** *** 178,186 **** variables to the key expression. If you do not specify a key, then all the parameter values will be used to cache the returned value. The expression ! may also call out to other objects in the spring container allowing for a more complex key algorithm to be encapsulated. The end result is that the Airport object is cached by id for 60 seconds in a cache named ! AspNetCache. The TimetoLive property could also havfe been specified on ! the configuration of the AspNetCache object.</para> <para>The configuration to enable the caching aspect is shown below</para> --- 178,186 ---- variables to the key expression. If you do not specify a key, then all the parameter values will be used to cache the returned value. The expression ! may also call out to other objects in the Spring container allowing for a more complex key algorithm to be encapsulated. The end result is that the Airport object is cached by id for 60 seconds in a cache named ! AspNetCache. The TimetoLive property could also have been specified on the ! configuration of the AspNetCache object.</para> <para>The configuration to enable the caching aspect is shown below</para> *************** *** 209,215 **** <para>in this example an <classname>ObjectNameAutoProxyCreator</classname> ! was used to apply this the cache aspect to objects that have Dao in their ! name. The AspNetCache setting for TimetoLive will override the TimeToLive ! value set on the method level via the attribute.</para> </sect1> --- 209,215 ---- <para>in this example an <classname>ObjectNameAutoProxyCreator</classname> ! was used to apply the cache aspect to objects that have Dao in their name. ! The AspNetCache setting for TimeToLive will override the TimeToLive value ! set at the method level via the attribute.</para> </sect1> *************** *** 241,249 **** that may form part of the exception. Once you get familiar with the feature set of Spring declarative exception handling advice you should ! evaluate where it maybe effectively applied in your code base. It is worth ! to note that you can still chain together multiple pieces of exception ! handling advice allowing you to mix the declarative approach shown in this ! section with the traditional inheritance based approach, i.e. implementing ! IThrowsAdvice or IMethodInterceptor.</para> <para>Declarative exception handling is expressed in the form of a --- 241,249 ---- that may form part of the exception. Once you get familiar with the feature set of Spring declarative exception handling advice you should ! evaluate where it may be effectively applied in your code base. It is ! worth noting that you can still chain together multiple pieces of ! exception handling advice allowing you to mix the declarative approach ! shown in this section with the traditional inheritance based approach, ! i.e. implementing IThrowsAdvice or IMethodInterceptor.</para> <para>Declarative exception handling is expressed in the form of a *************** *** 260,264 **** </object></programlisting>What this is instructing the advice to do is the following bit of code when an ArithmeticException is thrown, throw new ! System.InvalidOperationException("Wrapped ArithmeticException", e). where e is the original ArithmeticException. The default message, "Wrapped ArithmethicException" is automatically appended. You may however specify --- 260,264 ---- </object></programlisting>What this is instructing the advice to do is the following bit of code when an ArithmeticException is thrown, throw new ! System.InvalidOperationException("Wrapped ArithmeticException", e), where e is the original ArithmeticException. The default message, "Wrapped ArithmethicException" is automatically appended. You may however specify *************** *** 347,352 **** performed and the search for other matching exception names continues. For all other actions, namely translate, wrap, replace, swallow, return, once ! can exception handler is matched, those in the chain are no longer ! evaluated. Note, do not confuse this handler chain wit the general advice AOP advice chain. For translate, wrap, and replace actions a SpEL expression is created and used to instantiate a new exception (in addition --- 347,352 ---- performed and the search for other matching exception names continues. For all other actions, namely translate, wrap, replace, swallow, return, once ! an exception handler is matched, those in the chain are no longer ! evaluated. Note, do not confuse this handler chain with the general advice AOP advice chain. For translate, wrap, and replace actions a SpEL expression is created and used to instantiate a new exception (in addition *************** *** 354,359 **** which is then thrown.</para> ! <para>The exception handling DSL also supports the the ability to provide ! a SpEL boolean expression to determine if the advice will apply instead of just filtering by the expression name. For example, the following is the equivalent to the first example based on exception names but compares the --- 354,359 ---- which is then thrown.</para> ! <para>The exception handling DSL also supports the ability to provide a ! SpEL boolean expression to determine if the advice will apply instead of just filtering by the expression name. For example, the following is the equivalent to the first example based on exception names but compares the *************** *** 368,372 **** for a specific error number in an exception, i.e. <literal>(#e is T(System.Data.SqlException) && #e.Errors[0].Number in ! {156,170,207,208})</literal>, to catch and translate bad grammer codes in a SqlException.</para> --- 368,372 ---- for a specific error number in an exception, i.e. <literal>(#e is T(System.Data.SqlException) && #e.Errors[0].Number in ! {156,170,207,208})</literal>, to catch and translate bad grammar codes in a SqlException.</para> *************** *** 390,394 **** expression]</literal></para> ! <para>The exception names are requires as well as the action. The valid actions are</para> --- 390,394 ---- expression]</literal></para> ! <para>The exception names are required as well as the action. The valid actions are</para> *************** *** 421,425 **** <para>The form of the expression depends on the action. For logging, the entire string is taken as the SpEL expression to log. Translate expects ! an exception to be returned from evaluation the SpEL expression. wrap and replace are shorthand for the translate action. For wrap and replace you specify the exception name and the message to pass into the standard --- 421,425 ---- <para>The form of the expression depends on the action. For logging, the entire string is taken as the SpEL expression to log. Translate expects ! an exception to be returned from evaluation the SpEL expression. Wrap and replace are shorthand for the translate action. For wrap and replace you specify the exception name and the message to pass into the standard *************** *** 428,432 **** resolve the typename across all referenced assemblies. You may also register type aliases for use with SpEL in the standard manner with ! Spring.NET and those will be accessible form within the exception handling expression.</para> </sect2> --- 428,432 ---- resolve the typename across all referenced assemblies. You may also register type aliases for use with SpEL in the standard manner with ! Spring.NET and those will be accessible from within the exception handling expression.</para> </sect2> *************** *** 466,470 **** <para>You declare the logging advice in IoC container with the following XML fragment. Alternatively, you can use the class ! <classname>SimpleLoggingAdvice</classname> progammatically.</para> <programlisting><object name="loggingAdvice" type="Spring.Aspects.Logging.SimpleLoggingAdvice, Spring.Aop"> --- 466,470 ---- <para>You declare the logging advice in IoC container with the following XML fragment. Alternatively, you can use the class ! <classname>SimpleLoggingAdvice</classname> programatically.</para> <programlisting><object name="loggingAdvice" type="Spring.Aspects.Logging.SimpleLoggingAdvice, Spring.Aop"> *************** *** 497,501 **** true target type and not the proxy type.</para> ! <para>To futher extend the functionality of the <classname>SimpleLoggingAdvice</classname> you can subclass <classname>SimpleLoggingAdvice</classname> and override the methods</para> --- 497,501 ---- true target type and not the proxy type.</para> ! <para>To further extend the functionality of the <classname>SimpleLoggingAdvice</classname> you can subclass <classname>SimpleLoggingAdvice</classname> and override the methods</para> *************** *** 520,525 **** </itemizedlist> ! <para>The default implementation to calculate a unique identifer is to use ! a Guid. You can alter this behavior by overriding the method <literal>string CreateUniqueIdentifier()</literal>. The <classname>SimpleLoggingAdvice</classname> class inherits from --- 520,525 ---- </itemizedlist> ! <para>The default implementation to calculate a unique identifier is to ! use a GUID. You can alter this behavior by overriding the method <literal>string CreateUniqueIdentifier()</literal>. The <classname>SimpleLoggingAdvice</classname> class inherits from *************** *** 553,557 **** <para>The Spring 1.2 release will have an additional logging advice ! implementation the leverages the Spring Expression Language to further customize the content of the logging messages via simple configuration using similar syntax to the retry and exception handling advice.</para> --- 553,557 ---- <para>The Spring 1.2 release will have an additional logging advice ! implementation that leverages the Spring Expression Language to further customize the content of the logging messages via simple configuration using similar syntax to the retry and exception handling advice.</para> *************** *** 561,571 **** <title>Retry</title> ! <para>When making a distributed call it is oftena common requirement to be ! able to retry the method invocation if there was an exception. Typically ! the exception will be due to a communication issue that is intermitent and ! a retrying over a period of time will likely result in a successful ! invocation. When applying retry advice it is important to know if making ! two calls to the remote service will cause side effects. Genreally ! speaking, the method being invoked should be <ulink url="http://en.wikipedia.org/wiki/Idempotent#Computer_Science">idempotent</ulink>, that is, it is safe to call multiple times.</para> --- 561,571 ---- <title>Retry</title> ! <para>When making a distributed call it is often a common requirement to ! be able to retry the method invocation if there was an exception. ! Typically the exception will be due to a communication issue that is ! intermittent and retrying over a period of time will likely result in a ! successful invocation. When applying retry advice it is important to know ! if making two calls to the remote service will cause side effects. ! Generally speaking, the method being invoked should be <ulink url="http://en.wikipedia.org/wiki/Idempotent#Computer_Science">idempotent</ulink>, that is, it is safe to call multiple times.</para> *************** *** 577,582 **** <para>The meaning is: when an exception that has 'ArithmeticException' in ! its classname is thrown, retry the invocaiton up to 3 times and delay for ! 1 second in between each retry event.</para> <para>You can also provide a SpEL (Spring Expression Language) expression --- 577,582 ---- <para>The meaning is: when an exception that has 'ArithmeticException' in ! its type name is thrown, retry the invocation up to 3 times and delay for ! 1 second between each retry event.</para> <para>You can also provide a SpEL (Spring Expression Language) expression *************** *** 629,633 **** </itemizedlist>You declare the advice in IoC container with the following XML fragment. Alternatively, you can use the ! <classname>RetryAdvice</classname> class progammatically.</para> <programlisting><object name="exceptionHandlingAdvice" type="Spring.Aspects.RetryAdvice, Spring.Aop"> --- 629,633 ---- </itemizedlist>You declare the advice in IoC container with the following XML fragment. Alternatively, you can use the ! <classname>RetryAdvice</classname> class programatically.</para> <programlisting><object name="exceptionHandlingAdvice" type="Spring.Aspects.RetryAdvice, Spring.Aop"> *************** *** 638,642 **** <title>Language Reference</title> ! <para>The general syntax of the languae is</para> <para><literal>on exception name [ExceptionName1,ExceptionName2,...] --- 638,642 ---- <title>Language Reference</title> ! <para>The general syntax of the language is</para> <para><literal>on exception name [ExceptionName1,ExceptionName2,...] Index: psa-intro.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/psa-intro.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** psa-intro.xml 6 Dec 2007 07:25:30 -0000 1.1 --- psa-intro.xml 16 Jan 2008 17:21:44 -0000 1.2 *************** *** 12,21 **** define an exporter for that object. Similarly, on the client side you define an corresponding endpoint accessor. Of course, the object's methods ! stil need to be suitable for remoting, i.e. course grained, to avoid ! making uncessary and expensive remote calls. </para> <para>Since these exporters and client side endpoint accessors are defined using meta data for Spring IoC container, you can easily use dependency ! injection on then to set initial state and to 'wire up' the presentation tier, such as web forms, to the service layer. In addition, you may apply AOP aspects to the exported classes and/or service endpoints to apply --- 12,21 ---- define an exporter for that object. Similarly, on the client side you define an corresponding endpoint accessor. Of course, the object's methods ! still need to be suitable for remoting, i.e. coarse grained, to avoid ! making unnecessary and expensive remote calls.</para> <para>Since these exporters and client side endpoint accessors are defined using meta data for Spring IoC container, you can easily use dependency ! injection on them to set initial state and to 'wire up' the presentation tier, such as web forms, to the service layer. In addition, you may apply AOP aspects to the exported classes and/or service endpoints to apply *************** *** 29,33 **** the IoC container and not by recompilation. Of course, you may choose to not use the IoC container to manage these objects and use the exporter and ! service endpoints programmatically.</para> <para>The diagram shown below is a useful way to demonstrate the key --- 29,33 ---- the IoC container and not by recompilation. Of course, you may choose to not use the IoC container to manage these objects and use the exporter and ! service endpoints programatically.</para> <para>The diagram shown below is a useful way to demonstrate the key *************** *** 58,62 **** by a thin layer over the client access mechanism of the underlying distributed technology, though in some cases such as client side access to ! web services, you can the option to create a proxy on the fly from the .wsdl definition, much like you would have done using the command line tools.</para> --- 58,62 ---- by a thin layer over the client access mechanism of the underlying distributed technology, though in some cases such as client side access to ! web services, you have the option to create a proxy on the fly from the .wsdl definition, much like you would have done using the command line tools.</para> *************** *** 67,71 **** following this practice, and also lends itself to a straightforward approach to unit testing business functionality as stub or mock ! implementations maybe defined for testing purposes.</para> <para>The assembly <literal>Spring.Services.dll</literal> contains support --- 67,71 ---- following this practice, and also lends itself to a straightforward approach to unit testing business functionality as stub or mock ! implementations may be defined for testing purposes.</para> <para>The assembly <literal>Spring.Services.dll</literal> contains support Index: web.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/web.xml,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** web.xml 4 Jan 2008 17:09:51 -0000 1.33 --- web.xml 16 Jan 2008 17:21:44 -0000 1.34 *************** *** 41,46 **** Microsoft. It is worth noting that Spring Java has a very popular MVC framework and much of that experience and added value can be ! transliterated to help developers be more productive when using .NET ! upcoming MVC support.</para> <para>As we said earlier, event handlers in code-behind classes really --- 41,46 ---- Microsoft. It is worth noting that Spring Java has a very popular MVC framework and much of that experience and added value can be ! transliterated to help developers be more productive when using the ! upcoming ASP.NET MVC support.</para> <para>As we said earlier, event handlers in code-behind classes really *************** *** 51,57 **** team implemented bidirectional data binding framework to handle the mapping of values to and from the controls on a page to the underlying ! data model. Data binding framework also transparently takes care of data ! type conversion and formatting, enabling application developers to work ! with fully typed data (domain) objects in the event handler's of code-behind files.</para> --- 51,57 ---- team implemented bidirectional data binding framework to handle the mapping of values to and from the controls on a page to the underlying ! data model. The data binding framework also transparently takes care of ! data type conversion and formatting, enabling application developers to ! work with fully typed data (domain) objects in the event handlers of code-behind files.</para> *************** *** 65,69 **** 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 --- 65,69 ---- 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 can easily 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 *************** *** 71,75 **** <para>Standard localization support is also limited in versions of ASP.NET ! prior to ASP.NET 2.0. Even though Visual Studio.NET 2003 generates a local resource file for each ASP.NET <classname>Page</classname> and user control, those resources are never used by the ASP.NET infrastructure. --- 71,75 ---- <para>Standard localization support is also limited in versions of ASP.NET ! prior to ASP.NET 2.0. Even though Visual Studio 2003 generates a local resource file for each ASP.NET <classname>Page</classname> and user control, those resources are never used by the ASP.NET infrastructure. *************** *** 98,102 **** Spring.NET team had to extend (as in the object-oriented sense) the standard ASP.NET <classname>Page</classname> and ! <classname>UserControl</classname>classes. This means that in order to take advantage of the <emphasis>full</emphasis> feature stack of Spring.Web (most notably bidirectional data binding, localization and --- 98,102 ---- Spring.NET team had to extend (as in the object-oriented sense) the standard ASP.NET <classname>Page</classname> and ! <classname>UserControl</classname> classes. This means that in order to take advantage of the <emphasis>full</emphasis> feature stack of Spring.Web (most notably bidirectional data binding, localization and *************** *** 137,142 **** to locate an appropriate <classname>Page</classname> to handle a HTTP request. The <classname>WebSupportModule</classname> configures ! miscellaneous Spring infrastructure class for use in a web environment, ! for example setting the storage strategy of <classname>LogicalThreadContext</classname> to be <classname>HybridContextStorage</classname>.</para> --- 137,142 ---- to locate an appropriate <classname>Page</classname> to handle a HTTP request. The <classname>WebSupportModule</classname> configures ! miscellaneous Spring infrastructure classes for use in a web ! environment, for example setting the storage strategy of <classname>LogicalThreadContext</classname> to be <classname>HybridContextStorage</classname>.</para> *************** *** 145,150 **** container by the Spring.Web infrastructure is wholly transparent to application developers, who will typically never have to explicitly ! instatiate and configure an IoC container manually (by for example using ! the <literal>new</literal> operator in C#). In order to effect the transparent bootstrapping of the IoC container, the Spring.Web infrastructure requires the insertion of the following configuration --- 145,150 ---- container by the Spring.Web infrastructure is wholly transparent to application developers, who will typically never have to explicitly ! instantiate and configure an IoC container manually (by for example ! using the <literal>new</literal> operator in C#). In order to effect the transparent bootstrapping of the IoC container, the Spring.Web infrastructure requires the insertion of the following configuration *************** *** 251,255 **** context, and resource locations that contain the object definitions that will be used within the web application (such as service or ! busniness tier objects) then need to be specified as child elements within the <context> element. Object definition resources can be fully-qualified paths or URLs, or non-qualified, as in the --- 251,255 ---- context, and resource locations that contain the object definitions that will be used within the web application (such as service or ! business tier objects) then need to be specified as child elements within the <context> element. Object definition resources can be fully-qualified paths or URLs, or non-qualified, as in the *************** *** 268,272 **** application assemblies (<literal>assembly://</literal>), while continuing to load other object definitions from web resources that ! can be easily more easily edited.</para> </listitem> </orderedlist> --- 268,272 ---- application assemblies (<literal>assembly://</literal>), while continuing to load other object definitions from web resources that ! can be more easily edited.</para> </listitem> </orderedlist> *************** *** 382,386 **** <title>Dependency Injection for ASP.NET Pages</title> ! <para>Spring.Web builds on top of the featureset and capabilities of ASP.NET; one example of this can be seen the way that Spring.Web has used the code-behind class of the <classname>Page</classname> mechanism to --- 382,386 ---- <title>Dependency Injection for ASP.NET Pages</title> ! <para>Spring.Web builds on top of the feature set and capabilities of ASP.NET; one example of this can be seen the way that Spring.Web has used the code-behind class of the <classname>Page</classname> mechanism to *************** *** 388,392 **** pattern. In MVC-based (web) applications, the <literal>Controller</literal> is typically a thin wrapper around one or ! more service objects. in the specific case of Spring.Web, the Spring.NET team realized that it was very important that service object dependencies be easily injected into <classname>Page</classname> --- 388,392 ---- pattern. In MVC-based (web) applications, the <literal>Controller</literal> is typically a thin wrapper around one or ! more service objects. In the specific case of Spring.Web, the Spring.NET team realized that it was very important that service object dependencies be easily injected into <classname>Page</classname> *************** *** 517,521 **** </httpModules></programlisting> ! <para>To configure this module, naming conventions are use to identify the module name with configuration instructions in the Spring configuration file. The ModuleTemplates property of --- 517,521 ---- </httpModules></programlisting> ! <para>To configure this module, naming conventions are used to identify the module name with configuration instructions in the Spring configuration file. The ModuleTemplates property of *************** *** 523,527 **** of the HTTP module, HtmlCommentAppender, and as a value the configuration instructions as you would normally use for configuring an ! object with spring. An example is shown below. HttpApplicationConfigurer' ModuleTemplates property.</para> --- 523,527 ---- of the HTTP module, HtmlCommentAppender, and as a value the configuration instructions as you would normally use for configuring an ! object with Spring. An example is shown below. HttpApplicationConfigurer' ModuleTemplates property.</para> *************** *** 549,553 **** standard ASP.NET providers that are registered using the standard ASP.NET mechanism. The adapters inherit from their correspondingly named ! provider class from the BCL.</para> <itemizedlist> --- 549,553 ---- standard ASP.NET providers that are registered using the standard ASP.NET mechanism. The adapters inherit from their correspondingly named ! provider class in the BCL.</para> <itemizedlist> *************** *** 620,624 **** </object></programlisting> ! <para>Your own custom providers of course will contain the additional configuration specific to your implementation.</para> </sect2> --- 620,624 ---- </object></programlisting> ! <para>Your own custom providers of course will contain additional configuration specific to your implementation.</para> </sect2> *************** *** 783,788 **** <literal><body></literal> tags from the previous example are not strictly necessary because they are already defined in the master page. ! However, if these tags are omitted, then Visual Studio.NET.2003 will ! complain about a schema and IntelliSense won't work, so it's much easier to work in the HTML view if those tags are included. They will be ignored when the page is rendered.</para> --- 783,788 ---- <literal><body></literal> tags from the previous example are not strictly necessary because they are already defined in the master page. ! However, if these tags are omitted, then Visual Studio 2003 will ! complain about a schema and intellisense won't work, so it's much easier to work in the HTML view if those tags are included. They will be ignored when the page is rendered.</para> *************** *** 812,821 **** </objects></programlisting> ! <para>This approach alows application developers to change the master page being used for a number of pages within a web application. Of course, the master page can still be overridden on a per context or per page basis by creating a new abstract page definition within a child ! context, or by specifiying the <literal>MasterPageFile</literal> ! property directly.</para> </sect2> </sect1> --- 812,821 ---- </objects></programlisting> ! <para>This approach allows application developers to change the master page being used for a number of pages within a web application. Of course, the master page can still be overridden on a per context or per page basis by creating a new abstract page definition within a child ! context, or by specifying the <literal>MasterPageFile</literal> property ! directly.</para> </sect2> </sect1> *************** *** 825,834 **** <para>A problem with the existing data binding support in ASP.NET is that ! that it is one-way only. It allows application developers to bind page ! controls to the data model and display information from said data model, ! but it doesn't allow for the extraction of values from the controls when ! the form is submitted. Spring.Web adds such bidirectional data binding to ! ASP.NET by allowing developers to specify data binding rules for their ! page, and by automatically evaluating configured data binding rules at the appropriate time in the page's lifecycle.</para> --- 825,834 ---- <para>A problem with the existing data binding support in ASP.NET is that ! it is one-way only. It allows application developers to bind page controls ! to the data model and display information from said data model, but it ! doesn't allow for the extraction of values from the controls when the form ! is submitted. Spring.Web adds such bidirectional data binding to ASP.NET ! by allowing developers to specify data binding rules for their page, and ! by automatically evaluating configured data binding rules at the appropriate time in the page's lifecycle.</para> *************** *** 1001,1005 **** RoundTrip } ! }</programlisting>As you can see, <classname>Trip</classname> class uses <classname>TripPoint</classname> class to represent departure and return, which are exposed as <literal>StartingFrom</literal> and --- 1001,1005 ---- RoundTrip } ! }</programlisting>As you can see, <classname>Trip</classname> class uses the <classname>TripPoint</classname> class to represent departure and return, which are exposed as <literal>StartingFrom</literal> and *************** *** 1066,1070 **** } } ! }</programlisting>There are quite a few of things that are happening in this relatively simple piece of code, so it's worth that we spend some time on each one:<orderedlist> --- 1066,1070 ---- } } ! }</programlisting>There are quite a few things that are happening in this relatively simple piece of code, so it's worth that we spend some time on each one:<orderedlist> *************** *** 1072,1077 **** <para>When the page is initially loaded (<literal>IsPostback == false</literal>), the <literal>InitializeModel</literal> method is ! called which initializes trip object by creating a new instance and ! setting its properties to desired values. Right before page is rendered, <literal>SaveModel</literal> method will be invoked and whatever the value it returns will be stored within HTTP Session. --- 1072,1077 ---- <para>When the page is initially loaded (<literal>IsPostback == false</literal>), the <literal>InitializeModel</literal> method is ! called which initializes the trip object by creating a new instance ! and setting its properties to desired values. Right before page is rendered, <literal>SaveModel</literal> method will be invoked and whatever the value it returns will be stored within HTTP Session. *************** *** 1106,1124 **** now let's focus on the source and target expressions.</para> ! <para>Data Binding framework uses Spring.NET Expression Language to ! define binding expressions. In most cases, like in the example above, both source and target expression will evaluate to a property or a field within one of the controls or a data model. This is ! always the case when you are setting bi-directional binding, as both ! binsing expressions need to be "settable". What is important to remember about <literal>InitializeDataBindings</literal> method (other than the fact that you should configure your data binding rules there, of course ;-), is that it is executed only once <emphasis>per page type</emphasis>. Basically, all of the binding ! expressions are parsed the first time page is instantiated, and are ! the cached and used by all instances of that same page type that are ! created at a later time. This is done for performance reasons, as ! data binding expression parsing on every postback is unnecessary and ! would add a significant overhead to the overall page processing time.</para> </listitem> --- 1106,1124 ---- now let's focus on the source and target expressions.</para> ! <para>The Data Binding framework uses Spring.NET Expression Language ! to define binding expressions. In most cases, like in the example above, both source and target expression will evaluate to a property or a field within one of the controls or a data model. This is ! always the case when you are setting a bi-directional binding, as ! both binding expressions need to be "settable". What is important to remember about <literal>InitializeDataBindings</literal> method (other than the fact that you should configure your data binding rules there, of course ;-), is that it is executed only once <emphasis>per page type</emphasis>. Basically, all of the binding ! expressions are parsed the first time the page is instantiated, and ! are the cached and used by all instances of that same page type that ! are created ... [truncated message content] |
From: Erich E. <oak...@us...> - 2008-01-14 20:49:59
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aop/Framework/DynamicProxy In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32236/test/Spring/Spring.Aop.Tests/Aop/Framework/DynamicProxy Modified Files: AbstractAopProxyTests.cs Log Message: fix for SPRNET-847, SPRNET-846 Index: AbstractAopProxyTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aop/Framework/DynamicProxy/AbstractAopProxyTests.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** AbstractAopProxyTests.cs 28 Jul 2007 00:34:20 -0000 1.19 --- AbstractAopProxyTests.cs 14 Jan 2008 20:49:47 -0000 1.20 *************** *** 2042,2046 **** target.Age = 80; NopInterceptor nop1 = new NopInterceptor(); ! NopInterceptor nop2 = new NopInterceptor(); ProxyFactory pf = new ProxyFactory(target); pf.AddAdvice(nop1); --- 2042,2046 ---- target.Age = 80; NopInterceptor nop1 = new NopInterceptor(); ! NopInterceptor nop2 = new NopInterceptor(2); ProxyFactory pf = new ProxyFactory(target); pf.AddAdvice(nop1); |
From: Erich E. <oak...@us...> - 2008-01-14 20:49:59
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32236/src/Spring/Spring.Aop/Aop/Framework Modified Files: AdvisedSupport.cs Log Message: fix for SPRNET-847, SPRNET-846 Index: AdvisedSupport.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework/AdvisedSupport.cs,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** AdvisedSupport.cs 7 Dec 2007 17:58:56 -0000 1.35 --- AdvisedSupport.cs 14 Jan 2008 20:49:47 -0000 1.36 *************** *** 709,712 **** --- 709,715 ---- lock(this.SyncRoot) { + // advisor already in list (SPRNET-846) + if (_advisors.Contains(advisor)) return; + if(index == -1) { |
From: Erich E. <oak...@us...> - 2008-01-14 20:49:59
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aop/Interceptor In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32236/test/Spring/Spring.Aop.Tests/Aop/Interceptor Modified Files: NopInterceptor.cs SerializableNopInterceptor.cs Log Message: fix for SPRNET-847, SPRNET-846 Index: SerializableNopInterceptor.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aop/Interceptor/SerializableNopInterceptor.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SerializableNopInterceptor.cs 22 Oct 2005 15:30:49 -0000 1.2 --- SerializableNopInterceptor.cs 14 Jan 2008 20:49:47 -0000 1.3 *************** *** 39,47 **** public SerializableNopInterceptor(SerializationInfo info, StreamingContext ctxt) { ! this.count = (int) info.GetValue("Count", typeof(int)); ! } public void GetObjectData(SerializationInfo info, StreamingContext ctxt) { info.AddValue("Count", Count); } --- 39,49 ---- public SerializableNopInterceptor(SerializationInfo info, StreamingContext ctxt) { ! this.instanceId = (int) info.GetValue("InstanceId", typeof(int)); ! this.count = (int)info.GetValue("Count", typeof(int)); ! } public void GetObjectData(SerializationInfo info, StreamingContext ctxt) { + info.AddValue("InstanceId", InstanceId); info.AddValue("Count", Count); } Index: NopInterceptor.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aop/Interceptor/NopInterceptor.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** NopInterceptor.cs 9 Apr 2006 07:19:05 -0000 1.5 --- NopInterceptor.cs 14 Jan 2008 20:49:47 -0000 1.6 *************** *** 37,43 **** public class NopInterceptor : IMethodBeforeAdvice { protected int count; ! public int Count { get { return this.count; } --- 37,59 ---- public class NopInterceptor : IMethodBeforeAdvice { + protected int instanceId; protected int count; ! ! public NopInterceptor() : this(0) ! { ! } ! ! public NopInterceptor(int instanceId) ! { ! this.instanceId = instanceId; ! } ! ! public int InstanceId ! { ! get { return instanceId; } ! } ! ! public int Count { get { return this.count; } *************** *** 59,68 **** return true; } ! return count == ((NopInterceptor) other).count; } public override int GetHashCode() { ! return count; } } --- 75,85 ---- return true; } ! return (instanceId == ((NopInterceptor) other).InstanceId) ! && (count == ((NopInterceptor) other).count); } public override int GetHashCode() { ! return instanceId + 13 * count; } } |
From: Erich E. <oak...@us...> - 2008-01-14 20:49:59
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework/AutoProxy In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32236/src/Spring/Spring.Aop/Aop/Framework/AutoProxy Modified Files: AbstractAutoProxyCreator.cs Log Message: fix for SPRNET-847, SPRNET-846 Index: AbstractAutoProxyCreator.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractAutoProxyCreator.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** AbstractAutoProxyCreator.cs 8 Oct 2007 22:04:51 -0000 1.13 --- AbstractAutoProxyCreator.cs 14 Jan 2008 20:49:47 -0000 1.14 *************** *** 450,455 **** protected virtual object CreateProxy(Type objectType, string objectName, object[] specificInterceptors, ITargetSource targetSource) { ! ! ProxyFactory proxyFactory = new ProxyFactory(); // copy our properties (proxyTargetClass) inherited from ProxyConfig proxyFactory.CopyFrom(this); --- 450,454 ---- protected virtual object CreateProxy(Type objectType, string objectName, object[] specificInterceptors, ITargetSource targetSource) { ! ProxyFactory proxyFactory = CreateProxyFactory(); // copy our properties (proxyTargetClass) inherited from ProxyConfig proxyFactory.CopyFrom(this); *************** *** 491,494 **** --- 490,502 ---- /// <summary> + /// Obtain a new proxy factory instance to be used for proxying a particular object + /// </summary> + /// <returns>A proxy factory instance for proxying a particular object</returns> + protected virtual ProxyFactory CreateProxyFactory() + { + return new ProxyFactory(); + } + + /// <summary> /// Determines the advisors for the given object, including the specific interceptors /// as well as the common interceptor, all adapted to the Advisor interface. |
From: Erich E. <oak...@us...> - 2008-01-14 20:49:59
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32236/src/Spring/Spring.Data Modified Files: Spring.Data.2005.csproj Log Message: fix for SPRNET-847, SPRNET-846 Index: Spring.Data.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Spring.Data.2005.csproj,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** Spring.Data.2005.csproj 4 Dec 2007 19:43:17 -0000 1.61 --- Spring.Data.2005.csproj 14 Jan 2008 20:49:47 -0000 1.62 *************** *** 238,241 **** --- 238,242 ---- <Compile Include="Transaction\Interceptor\TransactionAspectSupport.cs" /> <Compile Include="Transaction\Interceptor\TransactionAttribute.cs" /> + <Compile Include="Transaction\Interceptor\TransactionAttributeConverter.cs" /> <Compile Include="Transaction\Interceptor\TransactionAttributeEditor.cs" /> <Compile Include="Transaction\Interceptor\TransactionAttributeSourceAdvisor.cs" /> |