Browse Source

SPR-4724

+ most of the problems were already fixed (probably by Mark). These are just minor adjustments

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2500 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Costin Leau 16 years ago
parent
commit
3800a1bdab
  1. 21
      spring-framework-reference/src/aop.xml
  2. 4
      spring-framework-reference/src/mail.xml
  3. 33
      spring-framework-reference/src/orm.xml
  4. 6
      spring-framework-reference/src/validation.xml

21
spring-framework-reference/src/aop.xml

@ -3212,8 +3212,10 @@ public class ProfilingAspect {
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation=" xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/beans
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<lineannotation>&lt;!-- a service object; we will be profiling its methods --&gt;</lineannotation> <lineannotation>&lt;!-- a service object; we will be profiling its methods --&gt;</lineannotation>
&lt;bean id="entitlementCalculationService" &lt;bean id="entitlementCalculationService"
@ -3437,8 +3439,10 @@ public final class Main {
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation=" xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/beans
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt; http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt;
&lt;context:load-time-weaver/&gt; &lt;context:load-time-weaver/&gt;
@ -3530,8 +3534,10 @@ http://www.springframework.org/schema/context http://www.springframework.org/sch
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation=" xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/beans
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt; http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt;
&lt;context:load-time-weaver &lt;context:load-time-weaver
<emphasis role="bold">weaver-class="org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver"</emphasis>/&gt; <emphasis role="bold">weaver-class="org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver"</emphasis>/&gt;
@ -3634,7 +3640,8 @@ http://www.springframework.org/schema/context http://www.springframework.org/sch
setup work.</para> setup work.</para>
<programlisting language="xml">&lt;Context path="/myWebApp" docBase="/my/webApp/location"&gt; <programlisting language="xml">&lt;Context path="/myWebApp" docBase="/my/webApp/location"&gt;
&lt;Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader" &lt;Loader
loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"
useSystemClassLoaderAsParent="false"/&gt; useSystemClassLoaderAsParent="false"/&gt;
&lt;/Context&gt; &lt;/Context&gt;
</programlisting> </programlisting>

4
spring-framework-reference/src/mail.xml

@ -386,8 +386,8 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans
<bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean"> <bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties"> <property name="velocityProperties">
<value> <value>
resource.loader=class resource.loader=class
class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</value> </value>
</property> </property>
</bean> </bean>

33
spring-framework-reference/src/orm.xml

@ -425,12 +425,14 @@ TR: REVISED, PLS REVIEW.-->This declarative transaction capability allows you
<lineannotation>&lt;!-- <interfacename>SessionFactory</interfacename>, <interfacename>DataSource</interfacename>, etc. omitted --&gt;</lineannotation> <lineannotation>&lt;!-- <interfacename>SessionFactory</interfacename>, <interfacename>DataSource</interfacename>, etc. omitted --&gt;</lineannotation>
&lt;bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt; &lt;bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt;
&lt;property name="sessionFactory" ref="sessionFactory"/&gt; &lt;property name="sessionFactory" ref="sessionFactory"/&gt;
&lt;/bean&gt; &lt;/bean&gt;
&lt;aop:config&gt; &lt;aop:config&gt;
&lt;aop:pointcut id="productServiceMethods" expression="execution(* product.ProductService.*(..))"/&gt; &lt;aop:pointcut id="productServiceMethods"
expression="execution(* product.ProductService.*(..))"/&gt;
&lt;aop:advisor advice-ref="txAdvice" pointcut-ref="productServiceMethods"/&gt; &lt;aop:advisor advice-ref="txAdvice" pointcut-ref="productServiceMethods"/&gt;
&lt;/aop:config&gt; &lt;/aop:config&gt;
@ -459,7 +461,8 @@ TR: REVISED, PLS REVIEW.-->This declarative transaction capability allows you
} }
<lineannotation>// notice the absence of transaction demarcation code in this method</lineannotation> <lineannotation>// notice the absence of transaction demarcation code in this method</lineannotation>
<lineannotation>// Spring's declarative transaction infrastructure will be demarcating transactions on your behalf </lineannotation> <lineannotation>// Spring's declarative transaction infrastructure will be demarcating</lineannotation>
<lineannotation>// transactions on your behalf </lineannotation>
public void increasePriceOfAllProductsInCategory(final String category) { public void increasePriceOfAllProductsInCategory(final String category) {
List productsToChange = this.productDao.loadProductsByCategory(category); List productsToChange = this.productDao.loadProductsByCategory(category);
<lineannotation>// ...</lineannotation> <lineannotation>// ...</lineannotation>
@ -515,7 +518,8 @@ TR: REVISED, PLS REVIEW.-->This declarative transaction capability allows you
<lineannotation>&lt;!-- <interfacename>SessionFactory</interfacename>, <interfacename>DataSource</interfacename>, etc. omitted --&gt;</lineannotation> <lineannotation>&lt;!-- <interfacename>SessionFactory</interfacename>, <interfacename>DataSource</interfacename>, etc. omitted --&gt;</lineannotation>
&lt;bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt; &lt;bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt;
&lt;property name="sessionFactory" ref="sessionFactory"/&gt; &lt;property name="sessionFactory" ref="sessionFactory"/&gt;
&lt;/bean&gt; &lt;/bean&gt;
@ -633,7 +637,8 @@ TR: REVISED, PLS REVIEW.-->This declarative transaction capability allows you
&lt;jee:jndi-lookup id="dataSource2" jndi-name="java:comp/env/jdbc/myds2"/&gt; &lt;jee:jndi-lookup id="dataSource2" jndi-name="java:comp/env/jdbc/myds2"/&gt;
&lt;bean id="mySessionFactory1" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt; &lt;bean id="mySessionFactory1"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
&lt;property name="dataSource" ref="myDataSource1"/&gt; &lt;property name="dataSource" ref="myDataSource1"/&gt;
&lt;property name="mappingResources"&gt; &lt;property name="mappingResources"&gt;
&lt;list&gt; &lt;list&gt;
@ -648,7 +653,8 @@ TR: REVISED, PLS REVIEW.-->This declarative transaction capability allows you
&lt;/property&gt; &lt;/property&gt;
&lt;/bean&gt; &lt;/bean&gt;
&lt;bean id="mySessionFactory2" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt; &lt;bean id="mySessionFactory2"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
&lt;property name="dataSource" ref="myDataSource2"/&gt; &lt;property name="dataSource" ref="myDataSource2"/&gt;
&lt;property name="mappingResources"&gt; &lt;property name="mappingResources"&gt;
&lt;list&gt; &lt;list&gt;
@ -678,7 +684,8 @@ TR: REVISED, PLS REVIEW.-->This declarative transaction capability allows you
&lt;/bean&gt; &lt;/bean&gt;
&lt;aop:config&gt; &lt;aop:config&gt;
&lt;aop:pointcut id="productServiceMethods" expression="execution(* product.ProductService.*(..))"/&gt; &lt;aop:pointcut id="productServiceMethods"
expression="execution(* product.ProductService.*(..))"/&gt;
&lt;aop:advisor advice-ref="txAdvice" pointcut-ref="productServiceMethods"/&gt; &lt;aop:advisor advice-ref="txAdvice" pointcut-ref="productServiceMethods"/&gt;
&lt;/aop:config&gt; &lt;/aop:config&gt;
@ -1169,7 +1176,8 @@ TR: OK AS IS. Two different callback methhods - one is Spring's (*afterCompletio
&lt;/tx:advice&gt; &lt;/tx:advice&gt;
&lt;aop:config&gt; &lt;aop:config&gt;
&lt;aop:pointcut id="productServiceMethods" expression="execution(* product.ProductService.*(..))"/&gt; &lt;aop:pointcut id="productServiceMethods"
expression="execution(* product.ProductService.*(..))"/&gt;
&lt;aop:advisor advice-ref="txAdvice" pointcut-ref="productServiceMethods"/&gt; &lt;aop:advisor advice-ref="txAdvice" pointcut-ref="productServiceMethods"/&gt;
&lt;/aop:config&gt; &lt;/aop:config&gt;
@ -1504,7 +1512,8 @@ TR: OK AS IS. The requirement is to provide the classloader for the runtime envi
file:</para> file:</para>
<programlisting language="xml">&lt;Context path="/myWebApp" docBase="/my/webApp/location"&gt; <programlisting language="xml">&lt;Context path="/myWebApp" docBase="/my/webApp/location"&gt;
&lt;Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/&gt; &lt;Loader
loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/&gt;
&lt;/Context&gt;</programlisting> &lt;/Context&gt;</programlisting>
<para>Tomcat 5.0.x and 5.5.x series support several context <para>Tomcat 5.0.x and 5.5.x series support several context
@ -1539,7 +1548,8 @@ TR: REVISED, PLS REVIEW. Chnaged the last one to *inside*--> is recommended
<emphasis>useSystemClassLoaderAsParent</emphasis> to <emphasis>useSystemClassLoaderAsParent</emphasis> to
<literal>false</literal> to fix the problem: <programlisting <literal>false</literal> to fix the problem: <programlisting
language="xml">&lt;Context path="/myWebApp" docBase="/my/webApp/location"&gt; language="xml">&lt;Context path="/myWebApp" docBase="/my/webApp/location"&gt;
&lt;Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader" &lt;Loader
loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"
useSystemClassLoaderAsParent="false"/&gt; useSystemClassLoaderAsParent="false"/&gt;
&lt;/Context&gt;</programlisting></para> &lt;/Context&gt;</programlisting></para>
</listitem> </listitem>
@ -1563,7 +1573,8 @@ TR: REVISED, PLS REVIEW. Chnaged the last one to *inside*--> is recommended
file:</para> file:</para>
<programlisting language="xml">&lt;Context path="/myWebApp" docBase="/my/webApp/location"&gt; <programlisting language="xml">&lt;Context path="/myWebApp" docBase="/my/webApp/location"&gt;
&lt;Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/&gt; &lt;Loader
loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/&gt;
&lt;/Context&gt;</programlisting> &lt;/Context&gt;</programlisting>
<para>The Tomcat 6.0.x (similar to 5.0.x/5.5.x) series <para>The Tomcat 6.0.x (similar to 5.0.x/5.5.x) series

6
spring-framework-reference/src/validation.xml

@ -117,7 +117,8 @@ public class Person {
public CustomerValidator(Validator addressValidator) { public CustomerValidator(Validator addressValidator) {
if (addressValidator == null) { if (addressValidator == null) {
throw new IllegalArgumentException("The supplied [Validator] is required and must not be null."); throw new IllegalArgumentException(
"The supplied [Validator] is required and must not be null.");
} }
if (!addressValidator.supports(Address.class)) { if (!addressValidator.supports(Address.class)) {
throw new IllegalArgumentException( throw new IllegalArgumentException(
@ -729,7 +730,8 @@ public final class CustomPropertyEditorRegistrar implements PropertyEditorRegist
this.customPropertyEditorRegistrar = propertyEditorRegistrar; this.customPropertyEditorRegistrar = propertyEditorRegistrar;
} }
protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder)
throws Exception {
]]><emphasis role="bold">this.customPropertyEditorRegistrar.registerCustomEditors(binder);</emphasis><![CDATA[ ]]><emphasis role="bold">this.customPropertyEditorRegistrar.registerCustomEditors(binder);</emphasis><![CDATA[
} }

Loading…
Cancel
Save