You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by gn...@apache.org on 2006/10/10 17:46:46 UTC
svn commit: r454790 [4/5] - in /geronimo/xbean/trunk: ./
xbean-spring-itests/ xbean-spring-itests/2.0/ xbean-spring-itests/2.0/src/
xbean-spring-itests/2.0/src/main/ xbean-spring-itests/2.0/src/main/resources/
xbean-spring-itests/2.0/src/main/resources...
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/RestaurantService.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/RestaurantService.java?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/RestaurantService.java (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/RestaurantService.java Tue Oct 10 08:46:36 2006
@@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.example;
+
+import javax.xml.namespace.QName;
+
+import java.net.URI;
+import java.util.List;
+
+/**
+ * An owner POJO used for testing out nested properties
+ *
+ * @org.apache.xbean.XBean namespace="http://xbean.apache.org/schemas/pizza" element="restaurant"
+ * description="A Restaurant thingy"
+ *
+ * @author James Strachan
+ * @version $Id$
+ * @since 2.0
+ */
+public class RestaurantService {
+
+ private PizzaService favourite;
+ private List dinnerMenu;
+ private PizzaService[] lunchMenu;
+ private QName serviceName;
+ private URI uri;
+
+ /**
+ * @org.apache.xbean.Property nestedType="org.apache.xbean.spring.example.PizzaService"
+ */
+ public List getDinnerMenu() {
+ return dinnerMenu;
+ }
+
+ public void setDinnerMenu(List dinnerMenu) {
+ this.dinnerMenu = dinnerMenu;
+ }
+
+ public PizzaService[] getLunchMenu() {
+ return lunchMenu;
+ }
+
+ public void setLunchMenu(PizzaService[] lunchMenu) {
+ this.lunchMenu = lunchMenu;
+ }
+
+ public PizzaService getFavourite() {
+ return favourite;
+ }
+
+ public void setFavourite(PizzaService favourite) {
+ this.favourite = favourite;
+ }
+
+ public QName getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(QName name) {
+ this.serviceName = name;
+ }
+
+ public URI getUri() {
+ return uri;
+ }
+
+ public void setUri(URI uri) {
+ this.uri = uri;
+ }
+
+}
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/SaladService.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/SaladService.java?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/SaladService.java (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/SaladService.java Tue Oct 10 08:46:36 2006
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.example;
+
+/**
+ * Basic salad.
+ * @org.apache.xbean.XBean
+ *
+ * @author Dain Sundstrom
+ * @version $Id$
+ * @since 1.0
+ */
+
+// START SNIPPET: bean
+public class SaladService {
+ private final String dressing;
+ private final String size;
+ private final boolean crouton;
+
+ public SaladService(String dressing, String size, boolean crouton) {
+ this.dressing = dressing;
+ this.size = size;
+ this.crouton = crouton;
+ }
+
+ /**
+ * Dressing What type of dressing do you want?
+ */
+ public String getDressing() {
+ return dressing;
+ }
+
+ /**
+ * What size do you want?
+ */
+ public String getSize() {
+ return size;
+ }
+
+ /**
+ * Do you want crutons on that?
+ * @org.apache.xbean.Property alias="addCroutons"
+ */
+ public boolean isCrouton() {
+ return crouton;
+ }
+}
+// END SNIPPET: bean
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/SoupService.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/SoupService.java?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/SoupService.java (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/SoupService.java Tue Oct 10 08:46:36 2006
@@ -0,0 +1,83 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.example;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @org.apache.xbean.XBean element="soup"
+ * description="This is a tasty soup"
+ *
+ * @author Dain Sundstrom
+ * @version $Id$
+ * @since 2.0
+ */
+
+// START SNIPPET: bean
+public class SoupService {
+ private static final Log log = LogFactory.getLog(SoupService.class);
+
+ /**
+ * @org.apache.xbean.FactoryMethod
+ */
+ public static SoupService newSoup(String type) {
+ return new SoupService(type, System.currentTimeMillis());
+ }
+
+ private final String type;
+ private final long createTime;
+ private boolean exists = false;
+
+ private SoupService(String type, long createTime) {
+ this.type = type;
+ this.createTime = createTime;
+ }
+
+ /**
+ * @org.apache.xbean.InitMethod
+ */
+ public void make() {
+ log.info("Making " + type + "soup");
+ exists = true;
+ }
+
+ /**
+ * @org.apache.xbean.DestroyMethod
+ */
+ public void eat() {
+ log.info("Mummmm " + type + "soup is yummie!");
+ exists = false;
+ }
+
+ public boolean exists() {
+ return exists;
+ }
+
+ /**
+ * What type of soup would you like?
+ */
+ public String getSoupType() {
+ return type;
+ }
+
+ public long getCreateTime() {
+ return createTime;
+ }
+}
+// END SNIPPET: bean
+
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/VodkaService.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/VodkaService.java?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/VodkaService.java (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/VodkaService.java Tue Oct 10 08:46:36 2006
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.example;
+
+/**
+ * It comes from a potatoe, it must be good.
+ *
+ * @org.apache.xbean.XBean element="vodka"
+ *
+ * @author Dan Diephouse
+ * @version $Id: VodkaService.java 434369 2006-08-24 10:24:21Z gnodet $
+ * @since 2.0
+ */
+
+// START SNIPPET: bean
+public class VodkaService {
+ private String id;
+ private String name;
+ private Class vodkaClass;
+
+ public VodkaService() {
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Class getVodkaClass() {
+ return vodkaClass;
+ }
+
+ public void setVodkaClass(Class vodkaClass) {
+ this.vodkaClass = vodkaClass;
+ }
+}
+// END SNIPPET: bean
+
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/WineService.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/WineService.java?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/WineService.java (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/example/WineService.java Tue Oct 10 08:46:36 2006
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.example;
+
+/**
+ * A drop of nice
+ *
+ * @org.apache.xbean.XBean element="wine"
+ *
+ * @author James Strachan
+ * @version $Id$
+ * @since 2.0
+ */
+
+// START SNIPPET: bean
+public class WineService {
+ private String id;
+ private String name;
+
+ public WineService(String id, String name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+}
+// END SNIPPET: bean
+
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/generator/CheeseService.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/generator/CheeseService.java?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/generator/CheeseService.java (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/generator/CheeseService.java Tue Oct 10 08:46:36 2006
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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;
+
+/**
+ * Cheezy goodness
+ *
+ * @org.apache.xbean.XBean element="cheese"
+ *
+ * @author Dain Sundstrom
+ * @version $Id$
+ */
+public class CheeseService {
+ private String id;
+ private String name;
+
+ public CheeseService(String id, String name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+}
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/generator/ModelTest.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/generator/ModelTest.java?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/generator/ModelTest.java (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/generator/ModelTest.java Tue Oct 10 08:46:36 2006
@@ -0,0 +1,119 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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;
+
+import java.beans.PropertyEditorManager;
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import junit.framework.TestCase;
+import org.apache.xbean.spring.example.BeerService;
+
+/**
+ * @author Dain Sundstrom
+ * @version $Id$
+ * @since 1.0
+ */
+public class ModelTest extends TestCase {
+ private static final String DEFAULT_NAMESPACE = "http://xbean.apache.org/test";
+
+ public void testQdox() throws Exception{
+ String basedir = System.getProperties().getProperty("basedir", ".");
+ QdoxMappingLoader mappingLoader = new QdoxMappingLoader(DEFAULT_NAMESPACE, new File[] { new File(basedir, "/src/test/java")}, null);
+ NamespaceMapping defaultNamespace = getDefaultNamespace(mappingLoader);
+ assertNotNull(defaultNamespace);
+ ElementMapping element = defaultNamespace.getElement("pizza");
+ assertNotNull(element);
+ AttributeMapping attribute = element.getAttribute("myTopping");
+ assertNotNull(attribute);
+ assertEquals("topping", attribute.getPropertyName());
+
+ ElementMapping beer = defaultNamespace.getElement("beer");
+ assertNotNull(beer);
+ AttributeMapping beerId = beer.getAttribute("id");
+ assertNotNull(beerId);
+ AttributeMapping beerName = beer.getAttribute("name");
+ assertNotNull(beerName);
+
+ ElementMapping recipeService = defaultNamespace.getElement("recipe-service");
+ assertNotNull(recipeService);
+
+ Map flatCollections = recipeService.getFlatCollections();
+ assertNotNull(flatCollections);
+ assertEquals(1, flatCollections.size());
+ }
+
+ public void testQdoxExcludeClass() throws Exception{
+ String basedir = System.getProperties().getProperty("basedir", ".");
+ QdoxMappingLoader mappingLoader = new QdoxMappingLoader(DEFAULT_NAMESPACE,
+ new File[] { new File(basedir, "/src/test/java")},
+ new String[] { BeerService.class.getName() } );
+
+ NamespaceMapping defaultNamespace = getDefaultNamespace(mappingLoader);
+ assertNotNull(defaultNamespace);
+
+ ElementMapping element = defaultNamespace.getElement("pizza");
+ assertNotNull(element);
+ ElementMapping beer = defaultNamespace.getElement("beer");
+ assertNull(beer);
+ }
+
+ public void testQdoxExcludePackage() throws Exception{
+ String basedir = System.getProperties().getProperty("basedir", ".");
+ QdoxMappingLoader mappingLoader = new QdoxMappingLoader(DEFAULT_NAMESPACE,
+ new File[] { new File(basedir, "/src/test/java")},
+ new String[] { "org.apache.xbean.spring.example" } );
+
+ NamespaceMapping defaultNamespace = getDefaultNamespace(mappingLoader);
+ assertNotNull(defaultNamespace);
+
+ ElementMapping element = defaultNamespace.getElement("pizza");
+ assertNull(element);
+ ElementMapping beer = defaultNamespace.getElement("beer");
+ assertNull(beer);
+ ElementMapping cheese = defaultNamespace.getElement("cheese");
+ assertNotNull(cheese);
+ }
+
+ private NamespaceMapping getDefaultNamespace(QdoxMappingLoader mappingLoader) throws IOException {
+ Set namespaces = mappingLoader.loadNamespaces();
+ assertFalse(namespaces.isEmpty());
+
+ NamespaceMapping defaultNamespace = null;
+ for (Iterator iterator = namespaces.iterator(); iterator.hasNext();) {
+ NamespaceMapping namespaceMapping = (NamespaceMapping) iterator.next();
+ if (namespaceMapping.getNamespace().equals(DEFAULT_NAMESPACE)) {
+ defaultNamespace = namespaceMapping;
+ break;
+ }
+ }
+ return defaultNamespace;
+ }
+
+ public void testPropertyEditor() {
+ List editorSearchPath = new LinkedList(Arrays.asList(PropertyEditorManager.getEditorSearchPath()));
+ editorSearchPath.add("org.apache.xbean.spring.context.impl");
+ PropertyEditorManager.setEditorSearchPath((String[]) editorSearchPath.toArray(new String[editorSearchPath.size()]));
+ assertTrue(Utils.isSimpleType(Type.newSimpleType("java.net.URI")));
+ }
+}
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/jndi/DefaultContextTest.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/jndi/DefaultContextTest.java?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/jndi/DefaultContextTest.java (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/jndi/DefaultContextTest.java Tue Oct 10 08:46:36 2006
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jndi;
+
+import javax.naming.Context;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+
+import java.util.Hashtable;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Revision: 657 $
+ */
+public class DefaultContextTest extends TestCase {
+ Context context = new DefaultContext(new Hashtable());
+
+ public void testSimpleName() throws Exception {
+ assertContextNamed("name");
+ }
+
+ public void testNestedName() throws Exception {
+ assertContextNamed("jdbc/name");
+ }
+
+ public void testDoubleNestedName() throws Exception {
+ assertContextNamed("jdbc/foo/name");
+ }
+
+ protected void assertContextNamed(String name) throws NamingException {
+ context.bind(name, "James");
+ assertJNDILookup(name, "James");
+
+ context.rebind(name, "Rob");
+ assertJNDILookup(name, "Rob");
+
+ context.unbind(name);
+
+ try {
+ context.lookup(name);
+ fail("Should ave thrown NameNotFoundException!");
+ }
+ catch (NameNotFoundException e) {
+ System.out.println("Caught expected exception: " + e);
+ }
+ }
+
+ protected void assertJNDILookup(String name, String expected) throws NamingException {
+ Object value = context.lookup(name);
+ assertEquals("Lookup failed for: " + name, expected, value);
+ }
+
+}
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/jndi/JndiTest.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/jndi/JndiTest.java?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/jndi/JndiTest.java (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/java/org/apache/xbean/spring/jndi/JndiTest.java Tue Oct 10 08:46:36 2006
@@ -0,0 +1,67 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jndi;
+
+import org.springframework.beans.factory.BeanFactory;
+import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import java.util.Hashtable;
+
+import junit.framework.TestCase;
+
+public class JndiTest extends TestCase {
+
+ protected InitialContext createInitialContext() throws Exception {
+ Hashtable env = new Hashtable();
+ env.put(Context.INITIAL_CONTEXT_FACTORY, SpringInitialContextFactory.class.getName());
+ env.put(Context.PROVIDER_URL, "classpath:org/apache/xbean/spring/jndi/jndi.xml");
+ return new InitialContext(env);
+ }
+
+ public void testSpringJNDILookup() throws Exception {
+ InitialContext context = createInitialContext();
+ assertEntryExists(context, "test");
+ assertEntryExists(context, "test/restaurant");
+ }
+
+ public void testConfigureJndiInsideSpringXml() throws Exception {
+ // lets load a spring context
+
+ BeanFactory factory = new ClassPathXmlApplicationContext("org/apache/xbean/spring/jndi/spring.xml");
+ Object test = factory.getBean("restaurant");
+ assertNotNull("Should have found the test object", test);
+ Object jndi = factory.getBean("jndi");
+ assertNotNull("Should have found the jndi object", jndi);
+
+ Hashtable env = new Hashtable();
+ env.put(Context.INITIAL_CONTEXT_FACTORY, SpringInitialContextFactory.class.getName());
+ InitialContext context = new InitialContext(env);
+ assertEntryExists(context, "test");
+ assertEntryExists(context, "test/restaurant");
+ assertSame(test, context.lookup("test/restaurant"));
+ }
+
+ protected void assertEntryExists(InitialContext context, String name) throws NamingException {
+ Object value = context.lookup(name);
+ assertNotNull(name + " should not be null", value);
+ }
+
+}
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/component
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/component?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/component (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/component Tue Oct 10 08:46:36 2006
@@ -0,0 +1,2 @@
+container=org.apache.xbean.spring.example.ContainerBean
+inner=org.apache.xbean.spring.example.InnerBean
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/pizza-simple
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/pizza-simple?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/pizza-simple (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/pizza-simple Tue Oct 10 08:46:36 2006
@@ -0,0 +1,10 @@
+# START SNIPPET: config
+
+# the default package that POJOs are in
+package = org.apache.xbean.spring.example
+
+# Mapping of XML Element localNames to classes
+pizza = org.apache.xbean.spring.example.PizzaService
+restaurant = org.apache.xbean.spring.example.RestaurantService
+
+# END SNIPPET: config
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/restaurant
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/restaurant?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/restaurant (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/restaurant Tue Oct 10 08:46:36 2006
@@ -0,0 +1,17 @@
+# START SNIPPET: config
+
+# the default package that POJOs are in
+package = org.apache.xbean.spring.example
+
+# Mapping of XML Element localNames to classes
+pizza = org.apache.xbean.spring.example.PizzaService
+restaurant = org.apache.xbean.spring.example.RestaurantService
+
+# Mapping of XML Attributes to property names
+pizza.alias.myTopping = topping
+
+# Mapping of nested bean properties
+restaurant.dinnerMenu.list = dinnerMenu
+restaurant.favourite = favourite
+
+# END SNIPPET: config
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/salad
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/salad?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/salad (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/salad Tue Oct 10 08:46:36 2006
@@ -0,0 +1,15 @@
+# START SNIPPET: config
+
+# the default package that POJOs are in
+package = org.apache.xbean.spring.example
+
+# Mapping of XML Element localNames to classes
+salad = org.apache.xbean.spring.example.SaladService
+
+# Mapping of XML Attributes to property names
+salad.alias.addCroutons = crouton
+
+# Mapping of constructor argument names
+org.apache.xbean.spring.example.SaladService(java.lang.String,java.lang.String,boolean).parameterNames=dressing size crouton
+
+# END SNIPPET: config
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/soup
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/soup?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/soup (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/META-INF/services/org/apache/xbean/spring/http/xbean.apache.org/schemas/soup Tue Oct 10 08:46:36 2006
@@ -0,0 +1,17 @@
+# START SNIPPET: config
+
+# the default package that POJOs are in
+package = org.apache.xbean.spring.example
+
+# Mapping of XML Element localNames to classes
+soup = org.apache.xbean.spring.example.SoupService
+
+# Mapping of life-cycle methods
+soup.initMethod = make
+soup.destroyMethod = eat
+soup.factoryMethod = newSoup
+
+# Mapping of constructor argument names
+org.apache.xbean.spring.example.SoupService.newSoup(java.lang.String).parameterNames=type
+
+# END SNIPPET: config
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/bad-attribute.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/bad-attribute.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/bad-attribute.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/bad-attribute.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<beans xmlns:b="http://xbean.apache.org/schemas/pizza">
+
+ <b:beer id="123" unknown="Stella" />
+
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/bad-element.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/bad-element.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/bad-element.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/bad-element.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<beans xmlns:b="http://xbean.apache.org/schemas/pizza">
+
+ <b:unknown id="123" name="Stella" />
+
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/bad-namespace.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/bad-namespace.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/bad-namespace.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/bad-namespace.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<beans xmlns:b="http://bad-namespace">
+
+ <b:beer name="Stella" />
+
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-normal.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-normal.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-normal.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-normal.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+ <bean id="beerService" class="org.apache.xbean.spring.example.BeerService">
+ <property name="id" value="123" />
+ <property name="name" value="Stella" />
+ </bean>
+
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean-ns.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean-ns.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean-ns.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean-ns.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans xmlns:b="http://xbean.apache.org/schemas/pizza"
+ xmlns:s="http://xbean.apache.org/schemas/spring/1.0"
+ xmlns="http://xbean.apache.org/schemas/pizza">
+
+ <beer b:id="123" id="beerService" name="Stella"/>
+
+</beans>
+<!-- END SNIPPET: xml -->
+
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean-null.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean-null.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean-null.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean-null.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans xmlns:b="http://xbean.apache.org/schemas/pizza" xmlns:s="http://xbean.apache.org/schemas/spring/1.0">
+
+ <b:beer s:id="beerService" id="123" name="Stella"/>
+
+ <b:beer s:id="beerService2" id="123" name="Blue Moon" source="#null"/>
+
+</beans>
+<!-- END SNIPPET: xml -->
+
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean-system-prop.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean-system-prop.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean-system-prop.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean-system-prop.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans xmlns:b="http://xbean.apache.org/schemas/pizza" xmlns:s="http://xbean.apache.org/schemas/spring/1.0">
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <b:beer s:id="beerService" id="123" name="${beerType}"/>
+
+</beans>
+<!-- END SNIPPET: xml -->
+
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/beer-xbean.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans xmlns:b="http://xbean.apache.org/schemas/pizza" xmlns:s="http://xbean.apache.org/schemas/spring/1.0">
+
+ <b:beer s:id="beerService" id="123" name="Stella"/>
+
+</beans>
+<!-- END SNIPPET: xml -->
+
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/component-spring.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/component-spring.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/component-spring.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/component-spring.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<beans>
+ <bean id="container" class="org.apache.xbean.spring.example.ContainerBean">
+ <property name="beans">
+ <list>
+ <bean id="inner" class="org.apache.xbean.spring.example.InnerBean" />
+ </list>
+ </property>
+ </bean>
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/component-xbean.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/component-xbean.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/component-xbean.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/component-xbean.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<beans xmlns:tns="http://xbean.apache.org/schemas/component">
+ <tns:container id="container">
+ <tns:beans>
+ <tns:inner id="inner" />
+ </tns:beans>
+ </tns:container>
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/favorite-normal.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/favorite-normal.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/favorite-normal.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/favorite-normal.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+ <bean id="favoriteService" class="org.apache.xbean.spring.example.FavoriteService">
+ <property name="favorites">
+ <map>
+ <entry key="Dan">
+ <value>Grey Goose</value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/favorite-xbean.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/favorite-xbean.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/favorite-xbean.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/favorite-xbean.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans xmlns:b="http://xbean.apache.org/schemas/pizza" xmlns:s="http://xbean.apache.org/schemas/spring/1.0">
+
+ <b:favorite s:id="favoriteService">
+ <b:favorites>
+ <b:favorite-item person="Dan">Grey Goose</b:favorite-item>
+ </b:favorites>
+ </b:favorite>
+
+</beans>
+<!-- END SNIPPET: xml -->
+
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/gin.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/gin.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/gin.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/gin.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans xmlns:b="http://xbean.apache.org/schemas/pizza">
+
+ <b:gin id="ginService"><![CDATA[Bombay Sapphire]]></b:gin>
+
+</beans>
+<!-- END SNIPPET: xml -->
+
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/keg-xbean.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/keg-xbean.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/keg-xbean.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/keg-xbean.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans xmlns:x="http://xbean.apache.org/schemas/pizza">
+
+ <x:keg id="ml1000" remaining="1000 ml"/>
+ <x:keg id="pints5" remaining="5 pints"/>
+ <x:keg id="liter20" remaining="20 liter"/>
+ <x:keg id="empty" remaining="0"/>
+
+</beans>
+<!-- END SNIPPET: xml -->
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-normal.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-normal.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-normal.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-normal.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+ <bean id="pizzaService" class="org.apache.xbean.spring.example.PizzaService">
+ <property name="topping" value="Salami"/>
+ <property name="cheese" value="Edam"/>
+ <property name="size" value="17"/>
+ </bean>
+
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean-bean-ref.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean-bean-ref.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean-bean-ref.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean-bean-ref.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans xmlns:p="http://xbean.apache.org/schemas/pizza">
+
+ <bean id="topping" class="java.lang.String">
+ <constructor-arg>
+ <value>Salami</value>
+ </constructor-arg>
+ </bean>
+
+ <p:pizza id="pizzaService" myTopping="#topping" cheese="##Edam" size="17"/>
+
+</beans>
+<!-- END SNIPPET: xml -->
+
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean-java.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean-java.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean-java.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean-java.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans xmlns:p="java://org.apache.xbean.spring.example">
+
+ <p:PizzaService id="pizzaService" topping="Salami" cheese="Edam" size="17"/>
+
+</beans>
+
+<!-- END SNIPPET: xml -->
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean-properties.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean-properties.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean-properties.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean-properties.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans xmlns:p="java://org.apache.xbean.spring.example">
+
+ <p:PizzaService id="pizzaService">
+ cheese Edam
+
+ <!-- properties can have complex elements mixed in -->
+ <p:topping>Salami</p:topping>
+
+ size 17
+ </p:PizzaService>
+
+</beans>
+
+<!-- END SNIPPET: xml -->
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/pizza-xbean.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans xmlns:p="http://xbean.apache.org/schemas/pizza">
+
+ <p:pizza id="pizzaService" myTopping="Salami" cheese="Edam" size="17"/>
+
+</beans>
+<!-- END SNIPPET: xml -->
+
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/qname-normal.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/qname-normal.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/qname-normal.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/qname-normal.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+ <bean id="qnameService" class="org.apache.xbean.spring.example.QNameService">
+ <property name="services">
+ <list>
+ <bean class="javax.xml.namespace.QName">
+ <constructor-arg value="urn:foo"/>
+ <constructor-arg value="test"/>
+ </bean>
+ <bean class="javax.xml.namespace.QName">
+ <constructor-arg value="urn:foo"/>
+ <constructor-arg value="bar"/>
+ </bean>
+ </list>
+ </property>
+ <property name="list">
+ <list>
+ <bean class="javax.xml.namespace.QName">
+ <constructor-arg value="urn:foo"/>
+ <constructor-arg value="list"/>
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/qname-xbean.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/qname-xbean.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/qname-xbean.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/qname-xbean.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<beans xmlns:x="http://xbean.apache.org/schemas/pizza"
+ xmlns:foo="urn:foo">
+
+ <x:qname-service id="qnameService">
+ <x:services>
+ <qname>foo:test</qname>
+ <qname>foo:bar</qname>
+ </x:services>
+ <x:list>
+ <qname>foo:list</qname>
+ </x:list>
+ </x:qname-service>
+
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/recipe-normal.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/recipe-normal.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/recipe-normal.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/recipe-normal.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+ <bean id="recipeService" class="org.apache.xbean.spring.example.RecipeService">
+ <property name="recipes">
+ <list>
+ <bean class="org.apache.xbean.spring.example.Recipe">
+ <property name="instructions" value="Mash together" />
+ <property name="ingredients" value="Food" />
+ </bean>
+ <bean class="org.apache.xbean.spring.example.Recipe">
+ <property name="instructions" value="Mash together" />
+ <property name="ingredients" value="Food" />
+ </bean>
+ </list>
+ </property>
+ <property name="topRecipe">
+ <bean class="org.apache.xbean.spring.example.Recipe">
+ <property name="instructions" value="Mash together" />
+ <property name="ingredients" value="Food" />
+ </bean>
+ </property>
+ </bean>
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/recipe-xbean.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/recipe-xbean.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/recipe-xbean.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/recipe-xbean.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<beans xmlns:x="http://xbean.apache.org/schemas/pizza" xmlns:foo="urn:foo">
+
+ <x:recipe-service id="recipeService">
+ <x:topRecipe>
+ <x:instructions>Mash together</x:instructions>
+ <x:ingredients>Food</x:ingredients>
+ </x:topRecipe>
+ <x:recipe>
+ <x:instructions>Mash together</x:instructions>
+ <x:ingredients>Food</x:ingredients>
+ </x:recipe>
+ <x:recipe>
+ <x:instructions>Mash together</x:instructions>
+ <x:ingredients>Food</x:ingredients>
+ </x:recipe>
+ </x:recipe-service>
+
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-normal.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-normal.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-normal.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-normal.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+ <!-- tests using nested beans -->
+
+ <bean id="restaurant"
+ class="org.apache.xbean.spring.example.RestaurantService">
+ <property name="serviceName">
+ <bean class="javax.xml.namespace.QName">
+ <constructor-arg value="http://acme.com"/>
+ <constructor-arg value="xyz"/>
+ </bean>
+ </property>
+ <property name="favourite">
+ <bean class="org.apache.xbean.spring.example.PizzaService">
+ <property name="topping" value="Salami" />
+ <property name="cheese" value="Edam" />
+ <property name="size" value="17" />
+ </bean>
+ </property>
+ <property name="dinnerMenu">
+ <list>
+ <bean class="org.apache.xbean.spring.example.PizzaService">
+ <property name="topping" value="Ham" />
+ <property name="cheese" value="Mozzarella" />
+ <property name="size" value="15" />
+ </bean>
+ <bean class="org.apache.xbean.spring.example.PizzaService">
+ <property name="topping" value="Eggs" />
+ <property name="cheese" value="Mozzarella" />
+ <property name="size" value="16" />
+ </bean>
+ </list>
+ </property>
+ <property name="lunchMenu">
+ <list>
+ <bean class="org.apache.xbean.spring.example.PizzaService">
+ <property name="topping" value="Chicken" />
+ <property name="cheese" value="Brie" />
+ <property name="size" value="17" />
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-spring-extended.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-spring-extended.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-spring-extended.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-spring-extended.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<beans xmlns:foo="http://acme.com">
+
+ <!-- tests using nested beans -->
+
+ <bean id="restaurant"
+ class="org.apache.xbean.spring.example.RestaurantService">
+ <property name="serviceName" value="foo:xyz"/>
+ <property name="favourite">
+ <bean class="org.apache.xbean.spring.example.PizzaService">
+ <property name="topping" value="Salami" />
+ <property name="cheese" value="Edam" />
+ <property name="size" value="17" />
+ </bean>
+ </property>
+ <property name="dinnerMenu">
+ <list>
+ <bean class="org.apache.xbean.spring.example.PizzaService">
+ <property name="topping" value="Ham" />
+ <property name="cheese" value="Mozzarella" />
+ <property name="size" value="15" />
+ </bean>
+ <bean class="org.apache.xbean.spring.example.PizzaService">
+ <property name="topping" value="Eggs" />
+ <property name="cheese" value="Mozzarella" />
+ <property name="size" value="16" />
+ </bean>
+ </list>
+ </property>
+ <property name="lunchMenu">
+ <list>
+ <bean class="org.apache.xbean.spring.example.PizzaService">
+ <property name="topping" value="Chicken" />
+ <property name="cheese" value="Brie" />
+ <property name="size" value="17" />
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+
+</beans>
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-mixed.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-mixed.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-mixed.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-mixed.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans xmlns:foo="http://acme.com">
+
+ <restaurant id="restaurant" xmlns="http://xbean.apache.org/schemas/pizza"
+ serviceName="foo:xyz">
+ <dinnerMenu>
+ <pizza myTopping="Ham" cheese="Mozzarella" size="15"/>
+ <bean xmlns="http://xbean.apache.org/schemas/spring/1.0" class="org.apache.xbean.spring.example.PizzaService">
+ <property name="topping" value="Eggs"/>
+ <property name="cheese" value="Mozzarella"/>
+ <property name="size" value="16"/>
+ </bean>
+ </dinnerMenu>
+
+ <lunchMenu>
+ <bean xmlns="" class="org.apache.xbean.spring.example.PizzaService">
+ <property name="topping" value="Chicken"/>
+ <property name="cheese" value="Brie"/>
+ <property name="size" value="17"/>
+ </bean>
+ </lunchMenu>
+
+ <favourite>
+ <bean xmlns="http://xbean.apache.org/schemas/spring/1.0" class="org.apache.xbean.spring.example.PizzaService">
+ <property name="topping" value="Salami"/>
+ <property name="cheese" value="Edam"/>
+ <property name="size" value="17"/>
+ </bean>
+ </favourite>
+ </restaurant>
+</beans>
+<!-- END SNIPPET: xml -->
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-root.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-root.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-root.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-root.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<restaurant id="restaurant" xmlns="http://xbean.apache.org/schemas/restaurant" xmlns:foo="http://acme.com" serviceName="foo:xyz" uri="http://cheese.com">
+ <dinnerMenu>
+ <pizza myTopping="Ham" cheese="Mozzarella" size="15"/>
+ <pizza myTopping="Eggs" cheese="Mozzarella" size="16"/>
+ </dinnerMenu>
+
+ <lunchMenu>
+ <pizza myTopping="Chicken" cheese="Brie" size="17"/>
+ </lunchMenu>
+
+ <favourite>
+ <pizza myTopping="Salami" cheese="Edam" size="17"/>
+ </favourite>
+</restaurant>
+<!-- END SNIPPET: xml -->
Added: geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-simple.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-simple.xml?view=auto&rev=454790
==============================================================================
--- geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-simple.xml (added)
+++ geronimo/xbean/trunk/xbean-spring-v2c/src/test/resources/org/apache/xbean/spring/context/restaurant-xbean-simple.xml Tue Oct 10 08:46:36 2006
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+
+-->
+<!-- START SNIPPET: xml -->
+<beans >
+
+ <restaurant id="restaurant" xmlns="http://xbean.apache.org/schemas/pizza-simple">
+ <dinnerMenu>
+ <pizza myTopping="Ham" cheese="Mozzarella" size="15"/>
+ <pizza myTopping="Eggs" cheese="Mozzarella" size="16"/>
+ </dinnerMenu>
+
+ <lunchMenu>
+ <pizza myTopping="Chicken" cheese="Brie" size="17"/>
+ </lunchMenu>
+
+ <favourite>
+ <pizza myTopping="Salami" cheese="Edam" size="17"/>
+ </favourite>
+ </restaurant>
+</beans>
+<!-- END SNIPPET: xml -->