From 4c91c426351fe96b4f4df39e0ac1439324885a7b Mon Sep 17 00:00:00 2001 From: markpollack Date: Tue, 10 Jun 2008 02:53:31 +0000 Subject: [PATCH] clean up aop schema in xml example add additional configuration examples for type registration and type alias. --- doc/reference/src/aop.xml | 4 +- doc/reference/src/index.xml | 37 +++++++++++---- doc/reference/src/objects.xml | 84 ++++++++++++++++++++++++++++------- 3 files changed, 99 insertions(+), 26 deletions(-) diff --git a/doc/reference/src/aop.xml b/doc/reference/src/aop.xml index 4c2646af..8d49316a 100644 --- a/doc/reference/src/aop.xml +++ b/doc/reference/src/aop.xml @@ -2167,9 +2167,7 @@ Saving speaker... <objects xmlns="http://www.springframework.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:aop="http://www.springframework.net/schema/aop" - xsi:schemaLocation="http://www.springframework.net http://www.springframework.net/schema/objects/spring-objects-1.1.xsd - http://www.springframework.net/schema/aop http://www.springframework.net/schema/aop/spring-aop-1.1.xsd"> + xmlns:aop="http://www.springframework.net/aop"> <aop:config> diff --git a/doc/reference/src/index.xml b/doc/reference/src/index.xml index eb35ae45..fdf2dfe5 100644 --- a/doc/reference/src/index.xml +++ b/doc/reference/src/index.xml @@ -16,6 +16,7 @@ + @@ -110,9 +111,9 @@ &overview; &background; &migration; - + Core Technologies - + This initial part of the reference documentation covers all of those technologies that are absolutely integral @@ -199,12 +200,12 @@ &logging; &testing; - + Middle Tier Data Access - + This part of the reference documentation is concerned - with the middle tier, and specifically the data access + with othe middle tier, and specifically the data access responsibilities of said tier. @@ -237,9 +238,9 @@ &ado; &orm; - + The Web - + This part of the reference documentation covers the Spring Framework's support for the presentation tier, @@ -286,7 +287,27 @@ &remoting; &services; &webservices; - + + + Integration + + + This part of the reference documentation covers + the Spring Framework's integration with a number of + related enterprise .NET technologies. + + + + + + + + + + + &jms; + &scheduling; + VS.NET Integration diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index 9bc277a7..ad02f4e8 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -3728,13 +3728,13 @@ public class AnotherExampleObject : IDisposable </object> ... the parent object cannot be instantiated on its own since it - incomplete, and it is also explicitly marked as abstract. - When a definition is defined to be abstract like this, it is usable only - as a pure template object definition that will serve as a parent - definition for child definitions. Trying to use such an abstract parent - object on its own (by referring to it as a ref property of another object, or - doing an explicit GetObject() with the parent - object id), will result in an error. The container's internal + incomplete, and it is also explicitly marked as abstract. When a + definition is defined to be abstract like this, it is usable only as a + pure template object definition that will serve as a parent definition for + child definitions. Trying to use such an abstract parent object on its own + (by referring to it as a ref property of another object, or doing an + explicit GetObject() with the parent object id), + will result in an error. The container's internal PreInstantiateSingletons method will completely ignore object definitions that are considered abstract. @@ -3747,9 +3747,8 @@ public class AnotherExampleObject : IDisposable true - , otherwise the application context will actually (attempt to) pre-instantiate the abstract object. + , otherwise the application context will actually (attempt to) pre-instantiate the abstract object. - @@ -5035,6 +5034,34 @@ cfg.PostProcessObjectFactory(factory); reader) and int ParseElement(XmlElement element, XmlResourceReader reader). Registering custom parsers outside of App.config will be addressed in a future release. + + To register a custom parser register a section handler of the type + Spring.Context.Support.NamespaceParsersSectionHandler + in the configSecitons section of App.config. The parser configuration + section contains one or more <parser> elements each with a type + attribute. Below is an example that registers all the namespaces + provided in Spring. + + <configuration> + + <configSections> + <sectionGroup name="spring"> + <!-- other configuration section handler defined here --> + <section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core"/> + </sectionGroup> + </configSections> + + <spring> + <parsers> + <parser type="Spring.Aop.Config.AopNamespaceParser, Spring.Aop" /> + <parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data" /> + <parser type="Spring.Transaction.Config.TxNamespaceParser, Spring.Data" /> + <parser type="Spring.Validation.Config.ValidationNamespaceParser, Spring.Core" /> + <parser type="Spring.Remoting.Config.RemotingNamespaceParser, Spring.Services" /> + </parsers> + </spring> + +</configuration> @@ -5047,10 +5074,12 @@ cfg.PostProcessObjectFactory(factory); FileSystemResource or AssemblyResource for implementation tips. You can register your custom resource handler either within App.config, as shown - above using a .ResourceHandlersSectionHandler or - define an object of the type - Spring.Objects.Factory.Config.ResourceHandlerConfigurer. - An example of the latter is shown below: + in the program listing at the start of this section using a + .ResourceHandlersSectionHandler or define an + object of the type + Spring.Objects.Factory.Config.ResourceHandlerConfigurer + as you would any other Spring managed object. An example of the latter + is shown below: <object id="myResourceHandlers" type="Spring.Objects.Factory.Config.ResourceHandlersSectionHandler, Spring.Core"> <property name="ResourceHandlers"> @@ -5089,8 +5118,33 @@ cfg.PostProcessObjectFactory(factory); </object> </property> <property name="Advice" ref="aspNetCacheAdvice"/> -</object> For an example showing type aliases for - generic types see + + To register a type alias register a section handler of the type + Spring.Context.Support.TypeAliasesSectionHandler in + the configSecitons section of App.config. The type alias configuration + section contains one or more <alias> elements each with a name and + a type attribute. Below is an example that registers the alias for + WebServiceExporter + + <configuration> + + <configSections> + <sectionGroup name="spring"> + <!-- other configuration section handler defined here --> + <section name="parsers" type="Spring.Context.Support.TypeAliasesSectionHandler, Spring.Core"/> + </sectionGroup> + </configSections> + + <spring> + <typeAliases> + <alias name="WebServiceExporter" type="Spring.Web.Services.WebServiceExporter, Spring.Web"/> + </typeAliases> + </spring> + +</configuration> + + For an example showing type aliases for generic types see . Another way is to define an object of the type