clean up aop schema in xml example
add additional configuration examples for type registration and type alias.
This commit is contained in:
@@ -2167,9 +2167,7 @@ Saving speaker...
|
||||
|
||||
<programlisting><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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -3728,13 +3728,13 @@ public class AnotherExampleObject : IDisposable
|
||||
</object></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 <parser> elements each with a type
|
||||
attribute. Below is an example that registers all the namespaces
|
||||
provided in Spring.</para>
|
||||
|
||||
<programlisting><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></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><object id="myResourceHandlers" type="Spring.Objects.Factory.Config.<classname>ResourceHandlersSectionHandler</classname>, Spring.Core">
|
||||
<property name="ResourceHandlers">
|
||||
@@ -5089,8 +5118,33 @@ cfg.PostProcessObjectFactory(factory);</programlisting></para>
|
||||
</object>
|
||||
</property>
|
||||
<property name="Advice" ref="aspNetCacheAdvice"/>
|
||||
</object></programlisting> For an example showing type aliases for
|
||||
generic types see <xref
|
||||
</object></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 <alias> elements each with a name and
|
||||
a type attribute. Below is an example that registers the alias for
|
||||
WebServiceExporter </para>
|
||||
|
||||
<programlisting><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></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
|
||||
|
||||
Reference in New Issue
Block a user