Discussion:
[mule-scm] [mule][24635] branches/mule-3.2.x: Merged revisions 24634 via svnmerge from
Pablo La Greca
2012-07-19 15:41:59 UTC
Permalink
Can you review your changes? It seems the build is not compiling due to
this merge.

Pablo.
**
Revision 24635 <http://fisheye.codehaus.org/changelog/mule/?cs=24635>
Author dfeist Date 2012-07-18 22:12:56 -0500 (Wed, 18 Jul 2012) Log
Message
Merged revisions 24634 via svnmerge from https://svn.codehaus.org/mule/branches/mule-3.1.x
........
r24634 <http://fisheye.codehaus.org/changelog/mule/?cs=24634> | dfeist | 2012-07-19 00:07:59 -0300 (Thu, 19 Jul 2012) | 1 line
MULE-6346 SpringBeanLookup.getObjectClass() is not idempotent
........
Modified Paths
-
branches/mule-3.2.x/modules/spring-config/src/main/java/org/mule/config/spring/util/SpringBeanLookup.java<#1389d395caa26ee6_branchesmule32xmodulesspringconfigsrcmainjavaorgmuleconfigspringutilSpringBeanLookupjava>
- branches/mule-3.2.x/tests/functional/pom.xml<#1389d395caa26ee6_branchesmule32xtestsfunctionalpomxml>
Added Paths
-
branches/mule-3.2.x/tests/functional/src/test/java/org/mule/config/spring/SpringAOPSpringBeanLookupTestCase.java<#1389d395caa26ee6_branchesmule32xtestsfunctionalsrctestjavaorgmuleconfigspringSpringAOPSpringBeanLookupTestCasejava>
-
branches/mule-3.2.x/tests/functional/src/test/resources/org/mule/config/spring/spring-aop-springbeanlookup-config.xml<#1389d395caa26ee6_branchesmule32xtestsfunctionalsrctestresourcesorgmuleconfigspringspringaopspringbeanlookupconfigxml>
Property Changed
- branches/mule-3.2.x/ <#1389d395caa26ee6_branchesmule32x>
Diff
Property changes: branches/mule-3.2.x
Modified: svnmerge-integrated
+
/branches/mule-3.1.x:1-22948,22951-22954,22958-22985,22989-22992,23002,23005,23009-23013,23016,23021,23023,23032,23037,23042-23043,23046,23050,23076,23079,23085,23089,23100-23101,23106,23109-23114,23121,23127-23128,23134,23143,23163-23314,23316-23322,23324-23403,23405-23422,23424-23426,23428-23429,23431-23582,23584-23586,23588-23589,23591-23619,23627-23638,23640-23650,23653-23654,23659-23661,23672,23674,23679-23680,23684,23693,23700,23709-23710,23713,23734-23735,23749,23753,23758,23761,23777,23787,23800,23818,23826,23841-23842,23859-23860,23864,23872,23884,23899,23907,23935,24072,24097,24118,24202,24301,24318,24349,24354,24362,24370,24388,24414,24466,24470,24482,24486,24525,24529,24533,24537-24538,24547,24570,24577,24581,24586,24595,24599,24609,24619,24623-24624,24634
Modified: svn:mergeinfo
/branches/mule-3.1.x:23002,23163,23431,23435-23436,23454-23455,23459,23471,23475,23499,23506,23509,23516,23530,23550,23596,23610,23616,23618-23619,23627-23631,23634,23644,23647-23648,23653-23654,23659-23661,23672,23674,23679-23680,23684,23693,23700,23709-23710,23713,23734-23735,23749,23753,23761,23777,23800,23818,23859-23860,23864,23872,23884,23899,23907,23935,24072,24097,24118,24202,24301,24318,24349,24354,24362,24370,24388,24414,24466,24470,24482,24486,24525,24529,24533,24537-24538,24547,24570,24577,24586,24595,24599,24609,24619,24623-24624
+ /branches/mule-2.2.x:23434 /branches/mule-3.1.x:23002,23163,23431,23435-23436,23454-23455,23459,23471,23475,23499,23506,23509,23516,23530,23550,23596,23610,23616,23618-23619,23627-23631,23634,23644,23647-23648,23653-23654,23659-23661,23672,23674,23679-23680,23684,23693,23700,23709-23710,23713,23734-23735,23749,23753,23761,23777,23800,23818,23859-23860,23864,23872,23884,23899,23907,23935,24072,24097,24118,24202,24301,24318,24349,24354,24362,24370,24388,24414,24466,24470,24482,24486,24525,24529,24533,24537-24538,24547,24570,24577,24586,24595,24599,24609,24619,24623-24624,24634
branches/mule-3.2.x/modules/spring-config/src/main/java/org/mule/config/spring/util/SpringBeanLookup.java
(24634 => 24635)
--- branches/mule-3.2.x/modules/spring-config/src/main/java/org/mule/config/spring/util/SpringBeanLookup.java 2012-07-19 03:07:59 UTC (rev 24634)
+ // Get instance of spring bean to determine bean type.
+ // We do this because the result of org.springframework.beans.factory.BeanFactory.getType(String) when
+ // used before bean initialization does not always return the same type as afterwards. One specific
+ // case when AOP is used, and the actual bean class is returned before initialization but a proxy
+ // afterwards. This affects both prototype beans and lazy-init singletons.
- {
- return applicationContext.getType(bean);
- }
-
Modified: branches/mule-3.2.x/tests/functional/pom.xml (24634 => 24635)
--- branches/mule-3.2.x/tests/functional/pom.xml 2012-07-19 03:07:59 UTC (rev 24634)
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>1.6.8</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjweaver</artifactId>
+ <version>1.6.8</version>
+ <scope>test</scope>
+ </dependency> </dependencies> </project>
branches/mule-3.2.x/tests/functional/src/test/java/org/mule/config/spring/SpringAOPSpringBeanLookupTestCase.java
(from rev 24634,
branches/mule-3.1.x/tests/functional/src/test/java/org/mule/config/spring/SpringAOPSpringBeanLookupTestCase.java)
(0 => 24635)
--- branches/mule-3.2.x/tests/functional/src/test/java/org/mule/config/spring/SpringAOPSpringBeanLookupTestCase.java (rev 0)
+ * $Id$
+ * --------------------------------------------------------------------------------------
+ * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
+ *
+ * The software in this package is published under the terms of the CPAL v1.0
+ * license, a copy of which has been included with this distribution in the
+ * LICENSE.txt file.
+ */
+
+package org.mule.config.spring;
+
+import static org.junit.Assert.assertTrue;
+
+import org.mule.api.component.JavaComponent;
+import org.mule.api.object.ObjectFactory;
+import org.mule.construct.SimpleFlowConstruct;
+import org.mule.tck.junit4.FunctionalTestCase;
+
+import org.junit.Test;
+
+/**
+ * Test to ensure that Mule always uses the real
+ */
+public class SpringAOPSpringBeanLookupTestCase extends FunctionalTestCase
+{
+
+ protected String getConfigResources()
+ {
+ return "org/mule/config/spring/spring-aop-springbeanlookup-config.xml";
+ }
+
+ protected boolean isStartContext()
+ {
+ return false;
+ }
+
+ protected boolean isDisposeContextPerClass()
+ {
+ return false;
+ }
+
+ public void beanType() throws Exception
+ {
+ ObjectFactory prototype = getPrototypeSpringObjectFactory();
+ ObjectFactory singleton = getSingletonSpringObjectFactory();
+
+ assertProxy(prototype.getObjectClass());
+ assertProxy(singleton.getObjectClass());
+ }
+
+ public void beanTypeAfterInstantiation() throws Exception
+ {
+ ObjectFactory prototype = getPrototypeSpringObjectFactory();
+ ObjectFactory singleton = getSingletonSpringObjectFactory();
+ prototype.getInstance(muleContext);
+ singleton.getInstance(muleContext);
+
+ assertProxy(prototype.getObjectClass());
+ assertProxy(singleton.getObjectClass());
+ }
+
+ public void beanTypeContextStarted() throws Exception
+ {
+ muleContext.start();
+
+ ObjectFactory prototype = getPrototypeSpringObjectFactory();
+ ObjectFactory singleton = getSingletonSpringObjectFactory();
+
+ assertProxy(prototype.getObjectClass());
+ assertProxy(singleton.getObjectClass());
+ }
+
+ public void beanTypeContextStartedAfterInstantiation() throws Exception
+ {
+ muleContext.start();
+
+ ObjectFactory prototype = getPrototypeSpringObjectFactory();
+ ObjectFactory singleton = getSingletonSpringObjectFactory();
+ prototype.getInstance(muleContext);
+ singleton.getInstance(muleContext);
+
+ assertProxy(prototype.getObjectClass());
+ assertProxy(singleton.getObjectClass());
+ }
+
+ private void assertProxy(Class<?> clazz)
+ {
+ assertTrue(clazz.getName().contains("$Proxy"));
+ }
+
+ private ObjectFactory getPrototypeSpringObjectFactory() throws Exception
+ {
+ return ((JavaComponent) ((SimpleFlowConstruct) getFlowConstruct("flow")).getMessageProcessors()
+ .get(0)).getObjectFactory();
+ }
+
+ private ObjectFactory getSingletonSpringObjectFactory() throws Exception
+ {
+ return ((JavaComponent) ((SimpleFlowConstruct) getFlowConstruct("flow")).getMessageProcessors()
+ .get(1)).getObjectFactory();
+ }
+
+}
branches/mule-3.2.x/tests/functional/src/test/resources/org/mule/config/spring/spring-aop-springbeanlookup-config.xml
(from rev 24634,
branches/mule-3.1.x/tests/functional/src/test/resources/org/mule/config/spring/spring-aop-springbeanlookup-config.xml)
(0 => 24635)
--- branches/mule-3.2.x/tests/functional/src/test/resources/org/mule/config/spring/spring-aop-springbeanlookup-config.xml (rev 0)
+<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:spring="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
+
+ <spring:beans>
+
+ <spring:bean name="prototypeApple" class="org.mule.tck.testmodels.fruit.Apple"
+ scope="prototype" />
+
+ <spring:bean name="singletonApple" class="org.mule.tck.testmodels.fruit.Apple"
+ scope="singleton" lazy-init="true" />
+
+ <spring:bean name="cleaner"
+ class="org.mule.tck.testmodels.fruit.FruitBowl" />
+
+ <aop:config>
+ <aop:aspect id="aspect" ref="cleaner">
+ <aop:pointcut id="pointcut"
+ expression="execution(* org.mule.tck.testmodels.fruit.Apple.*(..))" />
+ <aop:around pointcut-ref="pointcut" method="hasApple" />
+ </aop:aspect>
+ </aop:config>
+ </spring:beans>
+
+
+ <flow name="flow">
+ <component>
+ <spring-object bean="prototypeApple" />
+ </component>
+ <component>
+ <spring-object bean="singletonApple" />
+ </component>
+ </flow>
+
+</mule>
------------------------------
http://xircles.codehaus.org/manage_email
Loading...