geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r422100 - in /geronimo/xbean/branches/colossus: xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/ xbean-spring-v1/src/main/java/org/apache/xbean/spring/context/v1/ xbean-spring-v1/src/test/java/org/apache/xbean/spring/con...
Date Fri, 14 Jul 2006 23:53:14 GMT
Author: dain
Date: Fri Jul 14 16:53:13 2006
New Revision: 422100

URL: http://svn.apache.org/viewvc?rev=422100&view=rev
Log:
XBEAN-26 Nested properties not evaluated for named constructor args

Added:
    geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/ParameterMapping.java
Modified:
    geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
    geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/XmlMetadataGenerator.java
    geronimo/xbean/branches/colossus/xbean-spring-v1/src/main/java/org/apache/xbean/spring/context/v1/XBeanXmlBeanDefinitionParser.java
    geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/java/org/apache/xbean/spring/context/SoupUsingSpringTest.java
    geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/java/org/apache/xbean/spring/example/SoupService.java
    geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/resources/org/apache/xbean/spring/context/soup-normal.xml
    geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/resources/org/apache/xbean/spring/context/soup-xbean.xml
    geronimo/xbean/branches/colossus/xbean-spring-v2/src/main/java/org/apache/xbean/spring/context/v2/XBeanNamespaceHandler.java
    geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/java/org/apache/xbean/spring/context/SoupUsingSpringTest.java
    geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/java/org/apache/xbean/spring/example/SoupService.java
    geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/resources/org/apache/xbean/spring/context/soup-normal.xml
    geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/resources/org/apache/xbean/spring/context/soup-xbean.xml

Added: geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/ParameterMapping.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/ParameterMapping.java?rev=422100&view=auto
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/ParameterMapping.java
(added)
+++ geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/ParameterMapping.java
Fri Jul 14 16:53:13 2006
@@ -0,0 +1,38 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.xbean.spring.generator;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ParameterMapping {
+    private final String name;
+    private final Type type;
+
+    public ParameterMapping(String name, Type type) {
+        this.name = name;
+        this.type = type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public Type getType() {
+        return type;
+    }
+}

Modified: geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java?rev=422100&r1=422099&r2=422100&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
(original)
+++ geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
Fri Jul 14 16:53:13 2006
@@ -240,7 +240,6 @@
                 List args = new ArrayList(parameters.length);
                 for (int j = 0; j < parameters.length; j++) {
                     JavaParameter parameter = parameters[j];
-                    String parameterType = parameter.getType().toString();
                     AttributeMapping attributeMapping = (AttributeMapping) attributesByPropertyName.get(parameter.getName());
                     if (attributeMapping == null) {
                         attributeMapping = loadParameter(parameter);
@@ -248,13 +247,7 @@
                         attributes.add(attributeMapping);
                         attributesByPropertyName.put(attributeMapping.getPropertyName(),
attributeMapping);
                     }
-                    if (!parameterType.equals(attributeMapping.getType().getName())) {
-                        throw new InvalidModelException("Type mismatch:" +
-                                " The construction method " + toMethodLocator(parameter.getParentMethod())
+
-                                " declared parameter " + parameter.getName() + " as a " +
parameterType +
-                                " but the bean property type is " + attributeMapping.getType().getName());
-                    }
-                    args.add(attributeMapping);
+                    args.add(new ParameterMapping(attributeMapping.getPropertyName(), toMappingType(parameter.getType(),
null)));
                 }
                 constructorArgs.add(Collections.unmodifiableList(args));
             }

Modified: geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/XmlMetadataGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/XmlMetadataGenerator.java?rev=422100&r1=422099&r2=422100&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/XmlMetadataGenerator.java
(original)
+++ geronimo/xbean/branches/colossus/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/XmlMetadataGenerator.java
Fri Jul 14 16:53:13 2006
@@ -144,17 +144,17 @@
         }
         out.print("(");
         for (Iterator iterator = args.iterator(); iterator.hasNext();) {
-            AttributeMapping attributeMapping = (AttributeMapping) iterator.next();
-            out.print(attributeMapping.getType().getName());
+            ParameterMapping parameterMapping = (ParameterMapping) iterator.next();
+            out.print(parameterMapping.getType().getName());
             if (iterator.hasNext()) {
                 out.print(",");
             }
         }
         out.print(").parameterNames =");
         for (Iterator iterator = args.iterator(); iterator.hasNext();) {
-            AttributeMapping attributeMapping = (AttributeMapping) iterator.next();
+            ParameterMapping parameterMapping = (ParameterMapping) iterator.next();
             out.print(" ");
-            out.print(attributeMapping.getPropertyName());
+            out.print(parameterMapping.getName());
         }
         out.println();
     }

Modified: geronimo/xbean/branches/colossus/xbean-spring-v1/src/main/java/org/apache/xbean/spring/context/v1/XBeanXmlBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-v1/src/main/java/org/apache/xbean/spring/context/v1/XBeanXmlBeanDefinitionParser.java?rev=422100&r1=422099&r2=422100&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-v1/src/main/java/org/apache/xbean/spring/context/v1/XBeanXmlBeanDefinitionParser.java
(original)
+++ geronimo/xbean/branches/colossus/xbean-spring-v1/src/main/java/org/apache/xbean/spring/context/v1/XBeanXmlBeanDefinitionParser.java
Fri Jul 14 16:53:13 2006
@@ -42,7 +42,6 @@
 import org.apache.xbean.spring.context.impl.PropertyEditorHelper;
 import org.apache.xbean.spring.context.impl.QNameHelper;
 import org.apache.xbean.spring.context.impl.QNameReflectionHelper;
-import org.springframework.beans.MutablePropertyValues;
 import org.springframework.beans.PropertyValue;
 import org.springframework.beans.factory.BeanDefinitionStoreException;
 import org.springframework.beans.factory.config.BeanDefinition;
@@ -433,9 +432,10 @@
         String localName = getLocalName(element);
         PropertyDescriptor descriptor = getPropertyDescriptor(className, localName);
         if (descriptor != null) {
-            return parseNestedPropertyViaIntrospection(metadata, className, element, descriptor);
+            return parseNestedPropertyViaIntrospection(metadata, element, descriptor.getName(),
descriptor.getPropertyType());
+        } else {
+            return parseNestedPropertyViaIntrospection(metadata, element, localName, Object.class);
         }
-        return null;
     }
 
     /**
@@ -511,16 +511,12 @@
     /**
      * Attempts to use introspection to parse the nested property element.
      */
-    protected Object parseNestedPropertyViaIntrospection(MappingMetaData metadata, String
className, Element element,
-            PropertyDescriptor descriptor) {
-        String name = descriptor.getName();
-        if (isMap(descriptor.getPropertyType())) {
-            return parseCustomMapElement(metadata, element, name);
-        }
-        else if (isCollection(descriptor.getPropertyType())) {
-            return parseListElement(element, name);
-        }
-        else {
+    private Object parseNestedPropertyViaIntrospection(MappingMetaData metadata, Element
element, String propertyName, Class propertyType) {
+        if (isMap(propertyType)) {
+            return parseCustomMapElement(metadata, element, propertyName);
+        } else if (isCollection(propertyType)) {
+            return parseListElement(element, propertyName);
+        } else {
             return parseChildExtensionBean(element);
         }
     }
@@ -594,6 +590,8 @@
                 if (uri == null || uri.equals(SPRING_SCHEMA) || uri.equals(SPRING_SCHEMA_COMPAT))
{
                     if (BEAN_ELEMENT.equals(localName)) {
                         return parseBeanDefinitionElement(childElement, true);
+                    } else {
+                        return parsePropertySubElement(childElement, element.getLocalName());
                     }
                 } else {
                     Object value = parseBeanFromExtensionElement(childElement);

Modified: geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/java/org/apache/xbean/spring/context/SoupUsingSpringTest.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/java/org/apache/xbean/spring/context/SoupUsingSpringTest.java?rev=422100&r1=422099&r2=422100&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/java/org/apache/xbean/spring/context/SoupUsingSpringTest.java
(original)
+++ geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/java/org/apache/xbean/spring/context/SoupUsingSpringTest.java
Fri Jul 14 16:53:13 2006
@@ -29,13 +29,23 @@
 
     public void testSoup() throws Exception {
         SoupService soup = (SoupService) getBean("soupService");
+        SoupService nestedBean = (SoupService) getBean("nestedBean");
+        SoupService nestedValue = (SoupService) getBean("nestedValue");
 
-        assertEquals("type", "French Onion", soup.getType());
-        assertTrue(soup.getCreateTime() >= time);
-        assertTrue(soup.exists());
+        asssertValidSoup(soup);
+        asssertValidSoup(nestedBean);
+        asssertValidSoup(nestedValue);
 
         context.close();
         assertFalse(soup.exists());
+        assertFalse(nestedBean.exists());
+        assertFalse(nestedValue.exists());
+    }
+
+    private void asssertValidSoup(SoupService soup) {
+        assertEquals("type", "French Onion", soup.getSoupType());
+        assertTrue(soup.getCreateTime() >= time);
+        assertTrue(soup.exists());
     }
 
     protected AbstractXmlApplicationContext createApplicationContext() {

Modified: geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/java/org/apache/xbean/spring/example/SoupService.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/java/org/apache/xbean/spring/example/SoupService.java?rev=422100&r1=422099&r2=422100&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/java/org/apache/xbean/spring/example/SoupService.java
(original)
+++ geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/java/org/apache/xbean/spring/example/SoupService.java
Fri Jul 14 16:53:13 2006
@@ -1,19 +1,19 @@
 /**
  * 
  * Copyright 2005-2006 The Apache Software Foundation or its licensors,  as applicable.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- * 
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- * 
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
  **/
 package org.apache.xbean.spring.example;
 
@@ -27,7 +27,7 @@
  * @author Dain Sundstrom
  * @version $Id$
  * @since 2.0
- */              
+ */
 
 // START SNIPPET: bean
 public class SoupService {
@@ -72,7 +72,7 @@
     /**
      * What type of soup would you like?
      */
-    public String getType() {
+    public String getSoupType() {
         return type;
     }
 

Modified: geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/resources/org/apache/xbean/spring/context/soup-normal.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/resources/org/apache/xbean/spring/context/soup-normal.xml?rev=422100&r1=422099&r2=422100&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/resources/org/apache/xbean/spring/context/soup-normal.xml
(original)
+++ geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/resources/org/apache/xbean/spring/context/soup-normal.xml
Fri Jul 14 16:53:13 2006
@@ -2,7 +2,7 @@
 <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
 <beans>
 
-  <bean id="soupService" class="org.apache.xbean.spring.example.SoupService"
+  <bean id="soupService" name="nestedBean, nestedValue" class="org.apache.xbean.spring.example.SoupService"
     init-method="make"
     destroy-method="eat"
     factory-method="newSoup"

Modified: geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/resources/org/apache/xbean/spring/context/soup-xbean.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/resources/org/apache/xbean/spring/context/soup-xbean.xml?rev=422100&r1=422099&r2=422100&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/resources/org/apache/xbean/spring/context/soup-xbean.xml
(original)
+++ geronimo/xbean/branches/colossus/xbean-spring-v1/src/test/resources/org/apache/xbean/spring/context/soup-xbean.xml
Fri Jul 14 16:53:13 2006
@@ -4,6 +4,19 @@
 
   <s:soup id="soupService" type="French Onion"/>
 
+  <s:soup id="nestedBean">
+    <s:type>
+      <bean class="java.lang.String">
+        <constructor-arg index="0" value="French Onion"/>
+      </bean>
+    </s:type>
+  </s:soup>
+
+  <s:soup id="nestedValue">
+    <s:type>
+      <value>French Onion</value>
+    </s:type>
+  </s:soup>
 </beans>
 <!-- END SNIPPET: xml -->
 

Modified: geronimo/xbean/branches/colossus/xbean-spring-v2/src/main/java/org/apache/xbean/spring/context/v2/XBeanNamespaceHandler.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-v2/src/main/java/org/apache/xbean/spring/context/v2/XBeanNamespaceHandler.java?rev=422100&r1=422099&r2=422100&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-v2/src/main/java/org/apache/xbean/spring/context/v2/XBeanNamespaceHandler.java
(original)
+++ geronimo/xbean/branches/colossus/xbean-spring-v2/src/main/java/org/apache/xbean/spring/context/v2/XBeanNamespaceHandler.java
Fri Jul 14 16:53:13 2006
@@ -38,7 +38,6 @@
 import org.apache.xbean.spring.context.impl.NamedConstructorArgs;
 import org.apache.xbean.spring.context.impl.NamespaceHelper;
 import org.apache.xbean.spring.context.impl.PropertyEditorHelper;
-import org.springframework.beans.MutablePropertyValues;
 import org.springframework.beans.PropertyValue;
 import org.springframework.beans.factory.BeanDefinitionStoreException;
 import org.springframework.beans.factory.config.BeanDefinition;
@@ -504,9 +503,10 @@
         String localName = getLocalName(element);
         PropertyDescriptor descriptor = getPropertyDescriptor(className, localName);
         if (descriptor != null) {
-            return parseNestedPropertyViaIntrospection(metadata, className, element, descriptor);
+            return parseNestedPropertyViaIntrospection(metadata, element, descriptor.getName(),
descriptor.getPropertyType());
+        } else {
+            return parseNestedPropertyViaIntrospection(metadata, element, localName, Object.class);
         }
-        return null;
     }
 
     /**
@@ -530,16 +530,12 @@
     /**
      * Attempts to use introspection to parse the nested property element.
      */
-    protected Object parseNestedPropertyViaIntrospection(MappingMetaData metadata, String
className, Element element,
-            PropertyDescriptor descriptor) {
-        String name = descriptor.getName();
-        if (isMap(descriptor.getPropertyType())) {
-            return parseCustomMapElement(metadata, element, name);
-        }
-        else if (isCollection(descriptor.getPropertyType())) {
-            return parseListElement(element, name);
-        }
-        else {
+    private Object parseNestedPropertyViaIntrospection(MappingMetaData metadata, Element
element, String propertyName, Class propertyType) {
+        if (isMap(propertyType)) {
+            return parseCustomMapElement(metadata, element, propertyName);
+        } else if (isCollection(propertyType)) {
+            return parseListElement(element, propertyName);
+        } else {
             return parseChildExtensionBean(element);
         }
     }
@@ -620,6 +616,8 @@
                     uri.equals(BeanDefinitionParserDelegate.BEANS_NAMESPACE_URI)) {
                     if (BeanDefinitionParserDelegate.BEAN_ELEMENT.equals(localName)) {
                         return parserContext.getDelegate().parseBeanDefinitionElement(childElement,
true);
+                    } else {
+                        return parserContext.getDelegate().parsePropertySubElement(childElement);
                     }
                 } else {
                     Object value = parseBeanFromExtensionElement(childElement);

Modified: geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/java/org/apache/xbean/spring/context/SoupUsingSpringTest.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/java/org/apache/xbean/spring/context/SoupUsingSpringTest.java?rev=422100&r1=422099&r2=422100&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/java/org/apache/xbean/spring/context/SoupUsingSpringTest.java
(original)
+++ geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/java/org/apache/xbean/spring/context/SoupUsingSpringTest.java
Fri Jul 14 16:53:13 2006
@@ -29,13 +29,23 @@
 
     public void testSoup() throws Exception {
         SoupService soup = (SoupService) getBean("soupService");
+        SoupService nestedBean = (SoupService) getBean("nestedBean");
+        SoupService nestedValue = (SoupService) getBean("nestedValue");
 
-        assertEquals("type", "French Onion", soup.getType());
-        assertTrue(soup.getCreateTime() >= time);
-        assertTrue(soup.exists());
+        asssertValidSoup(soup);
+        asssertValidSoup(nestedBean);
+        asssertValidSoup(nestedValue);
 
         context.close();
         assertFalse(soup.exists());
+        assertFalse(nestedBean.exists());
+        assertFalse(nestedValue.exists());
+    }
+
+    private void asssertValidSoup(SoupService soup) {
+        assertEquals("type", "French Onion", soup.getSoupType());
+        assertTrue(soup.getCreateTime() >= time);
+        assertTrue(soup.exists());
     }
 
     protected AbstractXmlApplicationContext createApplicationContext() {

Modified: geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/java/org/apache/xbean/spring/example/SoupService.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/java/org/apache/xbean/spring/example/SoupService.java?rev=422100&r1=422099&r2=422100&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/java/org/apache/xbean/spring/example/SoupService.java
(original)
+++ geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/java/org/apache/xbean/spring/example/SoupService.java
Fri Jul 14 16:53:13 2006
@@ -1,19 +1,19 @@
 /**
  * 
  * Copyright 2005-2006 The Apache Software Foundation or its licensors,  as applicable.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- * 
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- * 
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
  **/
 package org.apache.xbean.spring.example;
 
@@ -27,7 +27,7 @@
  * @author Dain Sundstrom
  * @version $Id$
  * @since 2.0
- */              
+ */
 
 // START SNIPPET: bean
 public class SoupService {
@@ -72,7 +72,7 @@
     /**
      * What type of soup would you like?
      */
-    public String getType() {
+    public String getSoupType() {
         return type;
     }
 

Modified: geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/resources/org/apache/xbean/spring/context/soup-normal.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/resources/org/apache/xbean/spring/context/soup-normal.xml?rev=422100&r1=422099&r2=422100&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/resources/org/apache/xbean/spring/context/soup-normal.xml
(original)
+++ geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/resources/org/apache/xbean/spring/context/soup-normal.xml
Fri Jul 14 16:53:13 2006
@@ -2,7 +2,7 @@
 <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
 <beans>
 
-  <bean id="soupService" class="org.apache.xbean.spring.example.SoupService"
+  <bean id="soupService" name="nestedBean, nestedValue" class="org.apache.xbean.spring.example.SoupService"
     init-method="make"
     destroy-method="eat"
     factory-method="newSoup"

Modified: geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/resources/org/apache/xbean/spring/context/soup-xbean.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/resources/org/apache/xbean/spring/context/soup-xbean.xml?rev=422100&r1=422099&r2=422100&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/resources/org/apache/xbean/spring/context/soup-xbean.xml
(original)
+++ geronimo/xbean/branches/colossus/xbean-spring-v2/src/test/resources/org/apache/xbean/spring/context/soup-xbean.xml
Fri Jul 14 16:53:13 2006
@@ -4,6 +4,19 @@
 
   <s:soup id="soupService" type="French Onion"/>
 
+  <s:soup id="nestedBean">
+    <s:type>
+      <bean class="java.lang.String">
+        <constructor-arg index="0" value="French Onion"/>
+      </bean>
+    </s:type>
+  </s:soup>
+
+  <s:soup id="nestedValue">
+    <s:type>
+      <value>French Onion</value>
+    </s:type>
+  </s:soup>
 </beans>
 <!-- END SNIPPET: xml -->
 



Mime
View raw message