From 9a2078393bac4b7fc0e0d6aa56b1bbb48cb98611 Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Tue, 13 Dec 2011 15:44:27 +0100 Subject: [PATCH 01/13] #8 code formatting --- doc/reference/src/objects.xml | 94 ++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index 3fd88644..abc2c657 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -3922,7 +3922,7 @@ public sealed class Font : MarshalByRefObject, ICloneable, ISerializable, IDispo <object id="exampleInitObject" type="Examples.ExampleObject" init-method="init"/> - [C#] + [C#] public class ExampleObject { public void Init() @@ -4741,10 +4741,10 @@ cfg.PostProcessObjectFactory(factory); with a database connection and also a value for the maximum number of results to return in a query. Instead of hard coding the values into the main Spring.NET configuration file we use place holders, in the - NAnt style of ${variableName}, and obtain their values from - NameValueSections in the standard .NET application configuration file. - The Spring.NET configuration file looks like: <configuration> + NAnt style of ${variableName}, and obtain their + values from NameValueSections in the standard .NET + application configuration file. The Spring.NET configuration file + looks like: <configuration> <configSections> <sectionGroup name="spring"> @@ -4770,9 +4770,9 @@ cfg.PostProcessObjectFactory(factory); </configuration> - Notice the presence of two NameValueSections in the - configuration file. These name value pairs will be referred to in the - Spring.NET configuration file. In this example we are using an + Notice the presence of two NameValueSections + in the configuration file. These name value pairs will be referred to + in the Spring.NET configuration file. In this example we are using an embedded assembly resource for the location of the Spring.NET configuration file so as to reduce the chance of accidental tampering in deployment. This Spring.NET configuration file is shown @@ -4783,29 +4783,29 @@ cfg.PostProcessObjectFactory(factory); xsi:schemaLocation="http://www.springframework.net http://www.springframework.net/xsd/spring-objects.xsd" > - <object name="productDao" type="DaoApp.SimpleProductDao, DaoApp "> - <property name="maxResults" value="${maxResults}"/> - <property name="dbConnection" ref="myConnection"/> - </object> - - <object name="myConnection" type="System.Data.Odbc.OdbcConnection, System.Data"> - <property name="connectionstring" value="${connection.string}"/> - </object> + <object name="productDao" type="DaoApp.SimpleProductDao, DaoApp "> + <property name="maxResults" value="${maxResults}"/> + <property name="dbConnection" ref="myConnection"/> + </object> + + <object name="myConnection" type="System.Data.Odbc.OdbcConnection, System.Data"> + <property name="connectionstring" value="${connection.string}"/> + </object> - <object name="appConfigPropertyHolder" - type="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer, Spring.Core"> + <object name="appConfigPropertyHolder" + type="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer, Spring.Core"> + <property name="configSections"> + <value>DaoConfiguration,DatabaseConfiguration</value> + </property> + </object> - <property name="configSections"> - <value>DaoConfiguration,DatabaseConfiguration</value> - </property> - - </object> </objects> The values of ${maxResults} and ${connection.string} match the key names used in - the two NameValueSectionHandlers DaoConfiguration - and DatabaseConfiguration. The + the two NameValueSectionHandlers + DaoConfiguration and + DatabaseConfiguration. The PropertyPlaceholderConfigurer refers to these two sections via a comma delimited list of section names in the configSections property. If you are using section @@ -4846,8 +4846,10 @@ cfg.PostProcessObjectFactory(factory); If the class is unable to be resolved at runtime to a valid type, resolution of the object will fail once it is about to be - created (which is during the PreInstantiateSingletons() phase of an - ApplicationContext for a non-lazy-init object.) + created (which is during the + PreInstantiateSingletons() phase of an + ApplicationContext for a non-lazy-init + object.) Similarly you can replace 'ref' and 'expression' metadata, as shown below @@ -4961,14 +4963,14 @@ cfg.PostProcessObjectFactory(factory); IVariableSource - The IVariableSource is the base interface for providing the - ability to get the value of property placeholders (name-value) pairs - from a variety of sources. Out of the box, Spring.NET supports a - number of variable sources that allow users to obtain variable values - from .NET config files, java-style property files, environment - variables, command line arguments and the registry and the new - connection strings configuration section in .NET 2.0. The list of - implementing classes is listed below. Please refer to the SDK + The IVariableSource is the base interface for + providing the ability to get the value of property placeholders + (name-value) pairs from a variety of sources. Out of the box, + Spring.NET supports a number of variable sources that allow users to + obtain variable values from .NET config files, java-style property + files, environment variables, command line arguments and the registry + and the new connection strings configuration section in .NET 2.0. The + list of implementing classes is listed below. Please refer to the SDK documentation for more information. @@ -5015,17 +5017,17 @@ cfg.PostProcessObjectFactory(factory); property defined in multiple IVariableSource implementations, the first one in the list that contains the property value will be used. <object type="Spring.Objects.Factory.Config.VariablePlaceholderConfigurer, Spring.Core"> - <property name="VariableSources"> - <list> - <object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core"> - <property name="Location" value="~\application.properties" /> - <property name="IgnoreMissingResources" value="true"/> - </object> - <object type="Spring.Objects.Factory.Config.ConfigSectionVariableSource, Spring.Core"> - <property name="SectionNames" value="CryptedConfiguration" /> - </object> - </list> - </property> + <property name="VariableSources"> + <list> + <object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core"> + <property name="Location" value="~\application.properties" /> + <property name="IgnoreMissingResources" value="true"/> + </object> + <object type="Spring.Objects.Factory.Config.ConfigSectionVariableSource, Spring.Core"> + <property name="SectionNames" value="CryptedConfiguration" /> + </object> + </list> + </property> </object> The use of the IgnoreMissingResources From 6b055700404cc74daf8d3739a3393216d51f54a5 Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Fri, 16 Dec 2011 17:39:14 +0100 Subject: [PATCH 02/13] VariablePlaceHolderConfigurer example --- doc/reference/src/objects.xml | 56 ++++++++--------------------------- 1 file changed, 12 insertions(+), 44 deletions(-) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index abc2c657..7ab0bf1a 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -4961,51 +4961,19 @@ cfg.PostProcessObjectFactory(factory); - IVariableSource + Example: The + <literal>VariablePlaceholderConfigurer</literal> - The IVariableSource is the base interface for - providing the ability to get the value of property placeholders - (name-value) pairs from a variety of sources. Out of the box, - Spring.NET supports a number of variable sources that allow users to - obtain variable values from .NET config files, java-style property - files, environment variables, command line arguments and the registry - and the new connection strings configuration section in .NET 2.0. The - list of implementing classes is listed below. Please refer to the SDK - documentation for more information. - - - - ConfigSectionVariableSource - - - - PropertyFileVariableSource - - - - EnvironmentVariableSource - - - - CommandLineArgsVariableSource - - - - RegistryVariableSource - - - - SpecialFolderVariableSource - - - - ConnectionStringsVariableSource - - - - ConfigurableVariableSource - - + The VariablePlaceholderConfigurer is an + evolution of the PropertyPlaceHolderConfigurer. Out + of the box, Spring.NET supports a number of variable sources that + allow users to obtain variable values from .NET config files, + java-style property files, environment variables, command line + arguments and the registry and the new connection strings + configuration section in .NET 2.0. It is possible to add your own + variable sources to a VariablePlaceholderConfigurer + by implementing the IVariableSource + interface. You use this by defining an instance of Spring.Objects.Factory.Config.VariablePlaceholderConfigurer From 6d934ba9e415e83bcc79b7c7b70bd291eea3153c Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Fri, 16 Dec 2011 17:40:16 +0100 Subject: [PATCH 03/13] Add VariableSource configuration sections to documentation --- doc/reference/src/objects.xml | 253 ++++++++++++++++++++++++++++++++-- 1 file changed, 244 insertions(+), 9 deletions(-) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index 7ab0bf1a..23a9a54d 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -4996,24 +4996,259 @@ cfg.PostProcessObjectFactory(factory); </object> </list> </property> -</object> - +</object> The use of the IgnoreMissingResources property above will mean that if the property file is not found it will be silently ignored and the resolution will continue to ConfigSectionVariableSource. - The IVariableSource interface is shown below + - public interface IVariableSource + The variable sources that Spring.NET provides out of the box are + described in the following sections. + + + <literal>ConfigSectionVariableSource</literal> + + The ConfigSectionVariableSource allows you + to define variables in a custom configuration section in you + configuration file: + + <!-- app.config: --> +<configuration> + <configSections> + <section name="DonConfiguration" type="System.Configuration.NameValueSectionHandler"/> + </configSections> + <DonConfiguration> + <add key="don_name" value="Dick Whitman"/> + <add key="don_age" value="41" /> + </DonConfiguration> +</configuration> + +<!-- consume variables: --> +<object type="Example.Person, Spring.IocQuickStart.VariableSources"> + <property name="Name" value="${don_name}" /> + <property name="Age" value="${don_age}" /> +</object> + +<!-- VariableSource configuration: --> +<object type="Spring.Objects.Factory.Config.ConfigSectionVariableSource, Spring.Core"> + <property name="SectionNames" value="DonConfiguration" /> +</object> + + + This is similar to using the + PropertyPlaceHolderConfigurer described + above. + + By simply configuring the appropriate section, you can use the + ConfigSectionVariableSource to retrieve variables + from application settings and user settings. Assuming your + application's root namespace is + Spring.IocQuickStart, then your application- and + user settings can be loaded as variables by configuring the + following variable sources: + + <!-- From .net's ApplicationSettings: --> +<object type="Spring.Objects.Factory.Config.ConfigSectionVariableSource, Spring.Core"> + <property name="SectionNames" value="applicationSettings/Spring.IocQuickStart.Properties.Settings" /> +</object> + +<!-- From .net's UserSettings: --> +<object type="Spring.Objects.Factory.Config.ConfigSectionVariableSource, Spring.Core"> + <property name="SectionNames" value="userSettings/Spring.IocQuickStart.Properties.Settings" /> +</object> + + + If you configured your application settings as such: + + + + + + Then you can use ${peggy_name} + and ${peter_age} as variable placeholders in your + object definitions. + + + + <literal>PropertyFileVariableSource</literal> + + A PropertyFileVariableSource allows to read + properties defined in a Java-style property file as variables. + Assume a file named application.properties in + your application folder containing: + + joan_name=Joan Harris +joan_age=35 + + You can use the ${joan_name} and + ${joan_age} variable placeholders if you + configure the following variable source: + + <object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core"> + <property name="Location" value="~\application.properties" /> +</object> + + + + <literal>ConfigurableVariableSource</literal> + + A ConfigurableVariableSource allows you + define variables inline in a variable source definition. To + configure the variables midge_name and + midge_age, you can use the following + ConfigurableVariableSource definition: + + <object type="Spring.Objects.Factory.Config.ConfigurableVariableSource, Spring.Core"> + <property name="Variables"> + <name-values> + <add key="midge_name" value="Midge Daniels"/> + <add key="midge_age" value="33"/> + </name-values> + </property> +</object> + + + + <literal>CommandLineArgsVariableSource</literal> + + You can use commandline arguments as a source for variables. + Assume you issue the following command to start myapp: + + myapp /roger_name:"Roger Sterling" /roger_age:57 + + The following variable source configuration allows you to use + ${roger_name} and ${roger_age} + as variable placeholders: + + <object type="Spring.Objects.Factory.Config.CommandLineArgsVariableSource, Spring.Core"> + <property name="ArgumentPrefix" value ="/" /> <!-- optional; default: "/" --> + <property name="ValueSeparator" value=":" /> <!-- optional; default: ":" --> +</object> + + + + <literal>RegistryVariableSource</literal> + + Entries in the Windows registry can be used as variables. When + your registry contains the key + HKEY_CURRENT_USER\MyKey with entries + freddy_name (String) and freddy_age + (DWord), then you can configure the following variable + source to use freddy_name and + freddy_age as variables: + + <object type="Spring.Objects.Factory.Config.RegistryVariableSource, Spring.Core"> + <property name="Key" value="HKEY_CURRENT_USER\MyKey" /> +</object> + + + + <literal>EnvironmentVariableSource</literal> + + You can configure an + EnvironmentVariableSource an to retrieve + variables from environment variables available through .NET's + System.Environment class: + + <object type="Spring.Objects.Factory.Config.EnvironmentVariableSource, Spring.Core" /> + + + To retrieve a value for a variable named + ken_name, the + EnvironmentVariableSource will directly call + System.Environment.GetEnvironmentVariable("ken_name"). + + + + <literal>ConnectionStringsVariableSource</literal> + + Visual Studio has good support for configuring database + connection strings in a connectionStrings section + in you application configuration file. You can retrieve these + connections as variables by configuring a + ConnectionStringsVariableSource: + + <object type="Spring.Objects.Factory.Config.ConnectionStringsVariableSource, Spring.Core" /> + + Assume the following connection string section in your + application configuration file: + + <connectionStrings> + <add name="myConnection" + connectionString="Data Source=myserver;Integrated Security=True;..." + providerName="System.Data.SqlClient" /> +</connectionStrings> + + Then you would use the variables as in following object + definition: + + <object type="Example.MyClass, MyAssembly"> + <property name="ConnectionString" value="${myConnection.connectionString}" /> + <property name="ProviderName" value="${myConnection.providerName}" /> +</object> + + + Append ".connectionString" to the connection name to get + the connection string and append ".providerName" to the + connection name to get the provider name. + + When adding a connection using Visual Studio's application + settings, your connection will be named similar to + MyNamespace.Properties.Settings.myConnection + and the corresponding variable name for the connection string + would become + MyNamespace.Properties.Settings.myConnection.connectionString. + + + + + + <literal>SpecialFolderVariableSource</literal> + + The SpecialFolderVariableSource resolves + the full path for variable names against special folders as defined + by the System.Environment.SpecialFolder + enumeration. Add it to your variable sources as: + + <object type="Spring.Objects.Factory.Config.SpecialFolderVariableSource, Spring.Core" /> + + Now you can inject the full path to the current user's + desktop, or to this machine's program files folders: + + <object id="specials" type="Example.Specials, Spring.IocQuickStart.VariableSources"> + <property name="FullPathToDesktop" value="${Desktop}" /> + <property name="FullPathToPrgramFiles" value="${ProgramFiles}" /> +</object> + + Any entry in the System.Environment.SpecialFolder + enumeration can be used as a variable name. + + + + Custom <literal>IVariableSource</literal> + implementations + + The IVariableSource is the base interface + for providing the ability to get the value of property placeholders + (name-value) pairs from a variety of sources. The IVariableSource + interface is shown below: + + public interface IVariableSource { + bool CanResolveVariable(string name); string ResolveVariable(string name); } - 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. + 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. + From f551c5a6057420755e8eac0b90030a3bd48bd9ee Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Fri, 16 Dec 2011 20:00:43 +0100 Subject: [PATCH 04/13] Fix some typo's, minor cosmetic changes --- doc/reference/src/objects.xml | 58 ++++++++++++++++------------------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index 23a9a54d..5faa9a11 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -4969,11 +4969,10 @@ cfg.PostProcessObjectFactory(factory); of the box, Spring.NET supports a number of variable sources that allow users to obtain variable values from .NET config files, java-style property files, environment variables, command line - arguments and the registry and the new connection strings - configuration section in .NET 2.0. It is possible to add your own - variable sources to a VariablePlaceholderConfigurer - by implementing the IVariableSource - interface. + arguments, the registry and the new connection strings configuration + section in .NET 2.0. It is possible to add your own variable sources + to a VariablePlaceholderConfigurer by implementing + the IVariableSource interface. You use this by defining an instance of Spring.Objects.Factory.Config.VariablePlaceholderConfigurer @@ -5043,19 +5042,18 @@ cfg.PostProcessObjectFactory(factory); By simply configuring the appropriate section, you can use the ConfigSectionVariableSource to retrieve variables from application settings and user settings. Assuming your - application's root namespace is - Spring.IocQuickStart, then your application- and - user settings can be loaded as variables by configuring the - following variable sources: + application's root namespace is MyApp, then your + application- and user settings can be loaded as variables by + configuring the following variable sources: <!-- From .net's ApplicationSettings: --> <object type="Spring.Objects.Factory.Config.ConfigSectionVariableSource, Spring.Core"> - <property name="SectionNames" value="applicationSettings/Spring.IocQuickStart.Properties.Settings" /> + <property name="SectionNames" value="applicationSettings/MyApp.Properties.Settings" /> </object> <!-- From .net's UserSettings: --> <object type="Spring.Objects.Factory.Config.ConfigSectionVariableSource, Spring.Core"> - <property name="SectionNames" value="userSettings/Spring.IocQuickStart.Properties.Settings" /> + <property name="SectionNames" value="userSettings/MyApp.Properties.Settings" /> </object> @@ -5076,7 +5074,7 @@ cfg.PostProcessObjectFactory(factory); A PropertyFileVariableSource allows to read properties defined in a Java-style property file as variables. Assume a file named application.properties in - your application folder containing: + your application folder containing the following lines: joan_name=Joan Harris joan_age=35 @@ -5147,16 +5145,15 @@ joan_age=35 <literal>EnvironmentVariableSource</literal> You can configure an - EnvironmentVariableSource an to retrieve - variables from environment variables available through EnvironmentVariableSource to retrieve variables + from environment variables available through .NET's System.Environment class: <object type="Spring.Objects.Factory.Config.EnvironmentVariableSource, Spring.Core" /> - To retrieve a value for a variable named - ken_name, the + To resolve a variable named ken_name, the EnvironmentVariableSource will directly call System.Environment.GetEnvironmentVariable("ken_name"). @@ -5164,15 +5161,15 @@ joan_age=35 <literal>ConnectionStringsVariableSource</literal> - Visual Studio has good support for configuring database - connection strings in a connectionStrings section - in you application configuration file. You can retrieve these - connections as variables by configuring a + Visual Studio has support for configuring database connection + strings in a connectionStrings section in your + application configuration file. You can retrieve these connections + as variables by configuring a ConnectionStringsVariableSource: <object type="Spring.Objects.Factory.Config.ConnectionStringsVariableSource, Spring.Core" /> - Assume the following connection string section in your + Assuming the following connection strings section in your application configuration file: <connectionStrings> @@ -5182,7 +5179,7 @@ joan_age=35 </connectionStrings> Then you would use the variables as in following object - definition: + definition: <object type="Example.MyClass, MyAssembly"> <property name="ConnectionString" value="${myConnection.connectionString}" /> @@ -5195,12 +5192,11 @@ joan_age=35 connection name to get the provider name. When adding a connection using Visual Studio's application - settings, your connection will be named similar to - MyNamespace.Properties.Settings.myConnection - and the corresponding variable name for the connection string - would become - MyNamespace.Properties.Settings.myConnection.connectionString. - + settings user interface, your connection will be named similar + to MyApp.Properties.Settings.myConnection and + the corresponding variable name for the connection string would + become + MyApp.Properties.Settings.myConnection.connectionString. @@ -5224,7 +5220,7 @@ joan_age=35 Any entry in the System.Environment.SpecialFolder - enumeration can be used as a variable name. + enumeration can be used as a variable name. @@ -5233,8 +5229,8 @@ joan_age=35 The IVariableSource is the base interface for providing the ability to get the value of property placeholders - (name-value) pairs from a variety of sources. The IVariableSource - interface is shown below: + (name-value) pairs from a variety of sources. The + IVariableSource interface is shown below: public interface IVariableSource { From 1ab3d8563be44f892c315b8a2ec23609c8d23d69 Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Fri, 16 Dec 2011 20:17:36 +0100 Subject: [PATCH 05/13] Add missing image --- .../src/images/applicationsettings.png | Bin 0 -> 15050 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/reference/src/images/applicationsettings.png diff --git a/doc/reference/src/images/applicationsettings.png b/doc/reference/src/images/applicationsettings.png new file mode 100644 index 0000000000000000000000000000000000000000..997d7a972b261235ccda7c3f2edd9cfe25d94fa9 GIT binary patch literal 15050 zcmaL81wb9mwk6z10tpb@6FhiuOK^90cXta8f#4F{HMqOGySoH;cL@GB-@X5xH*aQM z(+65kbyrsxwbx#2RgjF7Fv5GB_W%GOh>8fv0RW^3xSb9Q3H}b7uMh(NK-kL(^8ux! zANRqXcQzub_5c8f`uc$Yl2Wk1gD?)F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c3 z?8Su`#o<9~c}?c}xnNb}ZuOHP?F07=$8WyKz;}@DJh%-w2&G7y8x<9kaWtCcpG#C= zklNLO?F+rsYj^MFJDJuYPqQGa{9ZjRRfS0HLgvadXc<`@iweZlgCinOfNnG$wd+d! z>-p}d5Ve}UIzo%lxf7^7p)d`EWUB7^cep%PZVlz1TSQ$qU#!szhKXc<>`Le%X1+hYq>Qoo7vQdK^m0WAQR>5lQWSp}>F1 zbJtp=e{n*+Oa#E}Jad4b|T;SYJ-Xu6P1sW#UnEy(2I{JSTv2ZkldSh!F#A z6&y&wNm07|p#XU>!$V|7=X$l@s|y1u+D(gYmPLU%rMS;ydSzuLu7K5gMW7Tf3e2*S zmrQXB7oj`a+j*p=!*M_Sp)>n$j9&i?T|MZhZ-B$%Wb6f@6U#EjBdF z)(pZlewRz)=pH_wmx2>~e%1u|P`sz!?BX}d3T@lun8+oIemQax0hD@wt=nDA+f4VP z|8li+er3D`2a#YOv|v4h-!$NWH_iHN5!z&Qov*?v!Ef}6o~iKz*}nI}mvz0(3(J`D zw}JoPOfNoKuy%fUOIv5)WH;YW&Tek_T<)*F5)QnvzVu$}W1@3i{95{0VJn8$e b@d8z}7uH}#i?RJWuT)e}N}!Za$LIe86low? literal 0 HcmV?d00001 From b2f3fa567880ea1bd7319e6e8291320a14857756 Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Fri, 16 Dec 2011 20:19:02 +0100 Subject: [PATCH 06/13] Consistent usage of variable for `${variablename}` --- doc/reference/src/objects.xml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index 5faa9a11..a98fa166 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -5064,8 +5064,8 @@ cfg.PostProcessObjectFactory(factory); Then you can use ${peggy_name} - and ${peter_age} as variable placeholders in your - object definitions. + and ${peter_age} as variables in your object + definitions. @@ -5080,8 +5080,8 @@ cfg.PostProcessObjectFactory(factory); joan_age=35 You can use the ${joan_name} and - ${joan_age} variable placeholders if you - configure the following variable source: + ${joan_age} variables if you configure the + following variable source: <object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core"> <property name="Location" value="~\application.properties" /> @@ -5093,8 +5093,8 @@ joan_age=35 A ConfigurableVariableSource allows you define variables inline in a variable source definition. To - configure the variables midge_name and - midge_age, you can use the following + configure the variables ${midge_name} and + ${midge_age}, you can use the following ConfigurableVariableSource definition: <object type="Spring.Objects.Factory.Config.ConfigurableVariableSource, Spring.Core"> @@ -5111,7 +5111,8 @@ joan_age=35 <literal>CommandLineArgsVariableSource</literal> You can use commandline arguments as a source for variables. - Assume you issue the following command to start myapp: + Assume you issue the following command to start your application + myapp: myapp /roger_name:"Roger Sterling" /roger_age:57 @@ -5133,8 +5134,8 @@ joan_age=35 HKEY_CURRENT_USER\MyKey with entries freddy_name (String) and freddy_age (DWord), then you can configure the following variable - source to use freddy_name and - freddy_age as variables: + source to use ${freddy_name} and + ${freddy_age} as variables: <object type="Spring.Objects.Factory.Config.RegistryVariableSource, Spring.Core"> <property name="Key" value="HKEY_CURRENT_USER\MyKey" /> @@ -5153,8 +5154,8 @@ joan_age=35 <object type="Spring.Objects.Factory.Config.EnvironmentVariableSource, Spring.Core" /> - To resolve a variable named ken_name, the - EnvironmentVariableSource will directly call + To resolve a variable named ${ken_name}, + the EnvironmentVariableSource will directly call System.Environment.GetEnvironmentVariable("ken_name"). From db44d5ab28ef83794e587a643c2f49972a8d2fb0 Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Mon, 19 Dec 2011 14:14:17 +0100 Subject: [PATCH 07/13] Fix typos --- doc/reference/src/objects.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index a98fa166..b8708cb5 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -5009,7 +5009,7 @@ cfg.PostProcessObjectFactory(factory); <literal>ConfigSectionVariableSource</literal> The ConfigSectionVariableSource allows you - to define variables in a custom configuration section in you + to define variables in a custom configuration section in your configuration file: <!-- app.config: --> @@ -5041,7 +5041,7 @@ cfg.PostProcessObjectFactory(factory); By simply configuring the appropriate section, you can use the ConfigSectionVariableSource to retrieve variables - from application settings and user settings. Assuming your + from .NET's application settings and user settings. Assuming your application's root namespace is MyApp, then your application- and user settings can be loaded as variables by configuring the following variable sources: @@ -5118,7 +5118,7 @@ joan_age=35 The following variable source configuration allows you to use ${roger_name} and ${roger_age} - as variable placeholders: + as variables: <object type="Spring.Objects.Factory.Config.CommandLineArgsVariableSource, Spring.Core"> <property name="ArgumentPrefix" value ="/" /> <!-- optional; default: "/" --> @@ -5132,9 +5132,9 @@ joan_age=35 Entries in the Windows registry can be used as variables. When your registry contains the key HKEY_CURRENT_USER\MyKey with entries - freddy_name (String) and freddy_age - (DWord), then you can configure the following variable - source to use ${freddy_name} and + freddy_name and freddy_age, + then you can configure the following variable source to use + ${freddy_name} and ${freddy_age} as variables: <object type="Spring.Objects.Factory.Config.RegistryVariableSource, Spring.Core"> From b8bde2779ad06eccfe907cd4397200b7fcc28724 Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Mon, 19 Dec 2011 14:36:47 +0100 Subject: [PATCH 08/13] Move note on `PropertyFileVariableSource` to detail section Also some formatting and typos/ --- doc/reference/src/objects.xml | 39 +++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index b8708cb5..81badcab 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -4607,7 +4607,7 @@ DEBUG - MovieApp Done. Customizing configuration metadata with - ObjectFactoryPostProcessors + IObjectFactoryPostProcessors The next extension point that we will look at is the Spring.Objects.Factory.Config.IObjectFactoryPostProcessor. @@ -4658,11 +4658,11 @@ DEBUG - MovieApp Done. An object factory post-processor is executed manually (in the case - of a IObjectFactory) or automatically (in the case of an - IApplicationContext) to apply changes of some sort to the configuration - metadata that defines a container. Spring.NET includes a number of - pre-existing object factory post-processors, such as - PropertyResourceConfigurer and + of a IObjectFactory) or automatically (in the case of + an IApplicationContext) to apply changes of some sort + to the configuration metadata that defines a container. Spring.NET + includes a number of pre-existing object factory post-processors, such + as PropertyResourceConfigurer and PropertyPlaceHolderConfigurer, both described below and ObjectNameAutoProxyCreator, which is very useful for wrapping other objects transactionally or with any other kind of proxy, as described @@ -4987,20 +4987,14 @@ cfg.PostProcessObjectFactory(factory); <property name="VariableSources"> <list> <object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core"> - <property name="Location" value="~\application.properties" /> - <property name="IgnoreMissingResources" value="true"/> + <property name="Location" value="~\application.properties" /> </object> <object type="Spring.Objects.Factory.Config.ConfigSectionVariableSource, Spring.Core"> <property name="SectionNames" value="CryptedConfiguration" /> </object> </list> </property> -</object> - The use of the IgnoreMissingResources - property above will mean that if the property file is not found it - will be silently ignored and the resolution will continue to - ConfigSectionVariableSource. - +</object> The variable sources that Spring.NET provides out of the box are described in the following sections. @@ -5080,12 +5074,21 @@ cfg.PostProcessObjectFactory(factory); joan_age=35 You can use the ${joan_name} and - ${joan_age} variables if you configure the - following variable source: + ${joan_age} variables in your object definitions + if you configure the following variable source: - <object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core"> + <object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core"> <property name="Location" value="~\application.properties" /> -</object> + <property name="IgnoreMissingResources" value="true"/> +</object> + + + The use of the IgnoreMissingResources + property above will mean that if the property file is not found + it will be silently ignored and the resolution will continue to + the next variable source(s) of the + VariablePlaceholderConfigurer. + From b17b27a0a9a24a4a693b96596f641f23cab9afe1 Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Mon, 19 Dec 2011 14:38:28 +0100 Subject: [PATCH 09/13] Move `VariableSourceConfiguration` up --- doc/reference/src/objects.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index 81badcab..637068d7 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -5017,16 +5017,16 @@ cfg.PostProcessObjectFactory(factory); </DonConfiguration> </configuration> +<!-- VariableSource configuration: --> +<object type="Spring.Objects.Factory.Config.ConfigSectionVariableSource, Spring.Core"> + <property name="SectionNames" value="DonConfiguration" /> +</object> + <!-- consume variables: --> <object type="Example.Person, Spring.IocQuickStart.VariableSources"> <property name="Name" value="${don_name}" /> <property name="Age" value="${don_age}" /> </object> - -<!-- VariableSource configuration: --> -<object type="Spring.Objects.Factory.Config.ConfigSectionVariableSource, Spring.Core"> - <property name="SectionNames" value="DonConfiguration" /> -</object> This is similar to using the From 2a2fd264d20e2c3c5d8af18d656df1de5b65575f Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Mon, 19 Dec 2011 16:08:40 +0100 Subject: [PATCH 10/13] Add note on user changes to user settings during container lifetime --- doc/reference/src/objects.xml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index 637068d7..959dbdee 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -5057,9 +5057,23 @@ cfg.PostProcessObjectFactory(factory); - Then you can use ${peggy_name} - and ${peter_age} as variables in your object - definitions. + Then you can use ${peggy_name}, + ${peggy_age}, + &{peter_name} and + ${peter_age} as variables in your object + definitions. They will be retrieved using the appropriate + scope. + Changes to user settings during the lifetime of your + application context will not be be visible + to the ConfigSectionVariableSource. Although + variables based on user settings will be resolved using user + scope, variables will only be resolved when the + VariablePlaceholderConfigurer is + initialized: that is when the context is created. Any + object (including lazy-loaded singletons and non-singletons) you + retrieve from the context will have the variable values injected + as they were when the context was loaded. + From c35a7ba6e1b7fa93022fe453c02b56633020bac6 Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Mon, 19 Dec 2011 16:16:50 +0100 Subject: [PATCH 11/13] Spell-check --- doc/reference/src/objects.xml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index 959dbdee..0010affc 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -4664,9 +4664,9 @@ DEBUG - MovieApp Done. includes a number of pre-existing object factory post-processors, such as PropertyResourceConfigurer and PropertyPlaceHolderConfigurer, both described below - and ObjectNameAutoProxyCreator, which is very useful for wrapping other - objects transactionally or with any other kind of proxy, as described - later in this manual. + and ObjectNameAutoProxyCreator, which is very useful + for wrapping other objects transactionally or with any other kind of + proxy, as described later in this manual. In an IObjectFactory, the process of applying an IObjectFactoryPostProcessor is manual, and will be @@ -4717,9 +4717,9 @@ cfg.PostProcessObjectFactory(factory); excellent solution when you want to externalize a few properties from a file containing object definitions. This is useful to allow the person deploying an application to customize environment specific - properties (for example database configuration strings, usernames, and - passwords), without the complexity or risk of modifying the main XML - definition file or files for the container. + properties (for example database configuration strings, user names, + and passwords), without the complexity or risk of modifying the main + XML definition file or files for the container. Variable substitution is performed on simple property values, lists, dictionaries, sets, constructor values, object type name, and @@ -4967,8 +4967,8 @@ cfg.PostProcessObjectFactory(factory); The VariablePlaceholderConfigurer is an evolution of the PropertyPlaceHolderConfigurer. Out of the box, Spring.NET supports a number of variable sources that - allow users to obtain variable values from .NET config files, - java-style property files, environment variables, command line + allow users to obtain variable values from .NET configuration files, + Java-style property files, environment variables, command line arguments, the registry and the new connection strings configuration section in .NET 2.0. It is possible to add your own variable sources to a VariablePlaceholderConfigurer by implementing @@ -5109,7 +5109,7 @@ joan_age=35 <literal>ConfigurableVariableSource</literal> A ConfigurableVariableSource allows you - define variables inline in a variable source definition. To + define variables in-line in a variable source definition. To configure the variables ${midge_name} and ${midge_age}, you can use the following ConfigurableVariableSource definition: @@ -5257,9 +5257,9 @@ joan_age=35 } 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 + create your own custom implementation. Look at the source code of + the current implementations for some inspiration if you go that + route. To register your own custom implementation, simply configure VariablePlaceholderConfigurer to refer to your class. From 7635db2a6f82a5699f3b9c04872cdce1d3fecd6d Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Thu, 29 Dec 2011 15:46:43 +0100 Subject: [PATCH 12/13] Add note on precedence rules for `PropertyFileVariableSource` --- doc/reference/src/objects.xml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index 0010affc..0ff2487f 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -5091,8 +5091,9 @@ joan_age=35 ${joan_age} variables in your object definitions if you configure the following variable source: - <object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core"> - <property name="Location" value="~\application.properties" /> + <object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core"> + <property name="Location" value="~\application.properties" /> <!-- specify a single ... --> + <property name="Locations" value="~\file1.properties,~\file2.properties" /> <!-- or multiple locations --> <property name="IgnoreMissingResources" value="true"/> </object> @@ -5103,12 +5104,22 @@ joan_age=35 the next variable source(s) of the VariablePlaceholderConfigurer. + + Within PropertyFileVariableSources, + precedence rules differ from the configuration of + VariableSources in the + VariablePlaceholderConfigurer. When the same + property occurs more than once in a property file, the value of the + last entry will be used. Same goes for + specifying the same variable in more than one location in a single + PropertyFileVariableSource: the entry from the + last file will be used. <literal>ConfigurableVariableSource</literal> - A ConfigurableVariableSource allows you + A ConfigurableVariableSource allows you to define variables in-line in a variable source definition. To configure the variables ${midge_name} and ${midge_age}, you can use the following From 35a1478e2cb013b0d6825dda7843d8aef568b679 Mon Sep 17 00:00:00 2001 From: Marijn van der Zee Date: Thu, 29 Dec 2011 15:47:10 +0100 Subject: [PATCH 13/13] Add note on non-existing registry keys --- doc/reference/src/objects.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index 0ff2487f..c135e961 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -5168,6 +5168,13 @@ joan_age=35 <object type="Spring.Objects.Factory.Config.RegistryVariableSource, Spring.Core"> <property name="Key" value="HKEY_CURRENT_USER\MyKey" /> </object> + + + The key must be present in the registry when the + configuration is read, otherwise an + ObjectCreationException will be + thrown. +