clean up aop schema in xml example

add additional configuration examples for type registration and type alias.
This commit is contained in:
markpollack
2008-06-10 02:53:31 +00:00
parent d277e69112
commit 4c91c42635
3 changed files with 99 additions and 26 deletions

View File

@@ -2167,9 +2167,7 @@ Saving speaker...
<programlisting>&lt;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"&gt;
xmlns:aop="http://www.springframework.net/aop"&gt;
&lt;aop:config&gt;

View File

@@ -16,6 +16,7 @@
<!ENTITY overview SYSTEM "overview.xml">
<!ENTITY psa-intro SYSTEM "psa-intro.xml">
<!ENTITY remoting SYSTEM "remoting.xml">
<!ENTITY nms SYSTEM "nms.xml">
<!ENTITY web SYSTEM "web.xml">
<!ENTITY ajax SYSTEM "ajax.xml">
<!ENTITY services SYSTEM "services.xml">
@@ -110,9 +111,9 @@
&overview;
&background;
&migration;
<part id="index-core">
<part id="spring-core">
<title>Core Technologies</title>
<partintro>
<partintro id="spring-core-intro">
<para>
This initial part of the reference documentation covers
all of those technologies that are absolutely integral
@@ -199,12 +200,12 @@
&logging;
&testing;
</part>
<part id="index-middle-tier">
<part id="spring-middle-tier">
<title>Middle Tier Data Access</title>
<partintro id="index-middle-tier-intro">
<partintro id="spring-middle-tier-intro">
<para>
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.
</para>
<para>
@@ -237,9 +238,9 @@
&ado;
&orm;
</part>
<part>
<part id="spring-web">
<title>The Web</title>
<partintro>
<partintro id="spring-web-intro">
<para>
This part of the reference documentation covers the
Spring Framework's support for the presentation tier,
@@ -286,7 +287,27 @@
&remoting;
&services;
&webservices;
</part>
</part>
<part id="spring-integration">
<title>Integration</title>
<partintro id="spring-integration-intro">
<para>
This part of the reference documentation covers
the Spring Framework's integration with a number of
related enterprise .NET technologies.
</para>
<itemizedlist>
<listitem>
<para><xref linkend="nms"/></para>
</listitem>
<listitem>
<para><xref linkend="scheduling"/></para>
</listitem>
</itemizedlist>
</partintro>
&jms;
&scheduling;
</part>
<part id="index-vsnet">
<title>VS.NET Integration</title>
<partintro>

View File

@@ -3728,13 +3728,13 @@ public class AnotherExampleObject : IDisposable
&lt;/object&gt;</programlisting></para>
<para>... 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 <methodname>GetObject()</methodname> 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 <methodname>GetObject()</methodname> with the parent object id),
will result in an error. The container's internal
<methodname>PreInstantiateSingletons</methodname> method will completely
ignore object definitions that are considered abstract.</para>
@@ -3747,9 +3747,8 @@ public class AnotherExampleObject : IDisposable
<emphasis>true</emphasis>
, 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.
</note>
</sect1>
<sect1 id="objects-factory-extension">
@@ -5035,6 +5034,34 @@ cfg.PostProcessObjectFactory(factory);</programlisting></para>
reader)</literal> and <literal>int ParseElement(XmlElement element,
XmlResourceReader reader)</literal>. Registering custom parsers outside
of App.config will be addressed in a future release.</para>
<para>To register a custom parser register a section handler of the type
<literal>Spring.Context.Support.NamespaceParsersSectionHandler</literal>
in the configSecitons section of App.config. The parser configuration
section contains one or more &lt;parser&gt; elements each with a type
attribute. Below is an example that registers all the namespaces
provided in Spring.</para>
<programlisting>&lt;configuration&gt;
&lt;configSections&gt;
&lt;sectionGroup name="spring"&gt;
&lt;!-- other configuration section handler defined here --&gt;
&lt;section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core"/&gt;
&lt;/sectionGroup&gt;
&lt;/configSections&gt;
&lt;spring&gt;
&lt;parsers&gt;
&lt;parser type="Spring.Aop.Config.AopNamespaceParser, Spring.Aop" /&gt;
&lt;parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data" /&gt;
&lt;parser type="Spring.Transaction.Config.TxNamespaceParser, Spring.Data" /&gt;
&lt;parser type="Spring.Validation.Config.ValidationNamespaceParser, Spring.Core" /&gt;
&lt;parser type="Spring.Remoting.Config.RemotingNamespaceParser, Spring.Services" /&gt;
&lt;/parsers&gt;
&lt;/spring&gt;
&lt;/configuration&gt;</programlisting>
</sect2>
<sect2 id="context-custom-resourcehandler">
@@ -5047,10 +5074,12 @@ cfg.PostProcessObjectFactory(factory);</programlisting></para>
<classname>FileSystemResource</classname> or
<classname>AssemblyResource</classname> for implementation tips. You can
register your custom resource handler either within App.config, as shown
above using a .<classname>ResourceHandlersSectionHandler</classname> or
define an object of the type
<classname>Spring.Objects.Factory.Config.ResourceHandlerConfigurer</classname>.
An example of the latter is shown below:</para>
in the program listing at the start of this section using a
.<classname>ResourceHandlersSectionHandler</classname> or define an
object of the type
<classname>Spring.Objects.Factory.Config.ResourceHandlerConfigurer</classname>
as you would any other Spring managed object. An example of the latter
is shown below:</para>
<programlisting>&lt;object id="myResourceHandlers" type="Spring.Objects.Factory.Config.<classname>ResourceHandlersSectionHandler</classname>, Spring.Core"&gt;
&lt;property name="ResourceHandlers"&gt;
@@ -5089,8 +5118,33 @@ cfg.PostProcessObjectFactory(factory);</programlisting></para>
&lt;/object&gt;
&lt;/property&gt;
&lt;property name="Advice" ref="aspNetCacheAdvice"/&gt;
&lt;/object&gt;</programlisting> For an example showing type aliases for
generic types see <xref
&lt;/object&gt;</programlisting></para>
<para>To register a type alias register a section handler of the type
<literal>Spring.Context.Support.TypeAliasesSectionHandler</literal> in
the configSecitons section of App.config. The type alias configuration
section contains one or more &lt;alias&gt; elements each with a name and
a type attribute. Below is an example that registers the alias for
WebServiceExporter </para>
<programlisting>&lt;configuration&gt;
&lt;configSections&gt;
&lt;sectionGroup name="spring"&gt;
&lt;!-- other configuration section handler defined here --&gt;
&lt;section name="parsers" type="Spring.Context.Support.TypeAliasesSectionHandler, Spring.Core"/&gt;
&lt;/sectionGroup&gt;
&lt;/configSections&gt;
&lt;spring&gt;
&lt;typeAliases&gt;
&lt;alias name="WebServiceExporter" type="Spring.Web.Services.WebServiceExporter, Spring.Web"/&gt;
&lt;/typeAliases&gt;
&lt;/spring&gt;
&lt;/configuration&gt;</programlisting>
<para> For an example showing type aliases for generic types see <xref
linkend="objects-creation-generic-types" />.</para>
<para>Another way is to define an object of the type