geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r785758 [1/2] - in /geronimo/sandbox/blueprint: ./ blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/ blueprint-core/src/main/java/org/apache/geronimo/blue...
Date Wed, 17 Jun 2009 19:06:15 GMT
Author: gnodet
Date: Wed Jun 17 19:06:04 2009
New Revision: 785758

URL: http://svn.apache.org/viewvc?rev=785758&view=rev
Log:
Update to latest api, refactor instanciator / repository

Added:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintRepository.java
      - copied, changed from r784675, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/DefaultRepository.java
    geronimo/sandbox/blueprint/blueprint-itests/src/test/resources/.runner.properties
Removed:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectInstantiator.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/DefaultExecutionContext.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/DefaultRepository.java
Modified:
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java
    geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedProperties.java
    geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefListRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ReferenceRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/AbstractRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ExecutionContext.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/IdRefRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/RefRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Repository.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/AbstractPropertyPlaceholder.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableCollectionMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceReferenceMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableValueMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/CollectionMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefListMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceReferenceMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ValueMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/TypeUtils.java
    geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java
    geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/TestBlueprintContainer.java
    geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/WiringTest.java
    geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/BlueprintContainerTest.java
    geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestConfigAdmin.java
    geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestReferences.java
    geronimo/sandbox/blueprint/blueprint-itests/src/test/resources/equinox-3.5.0.v20090429-1630.xml
    geronimo/sandbox/blueprint/blueprint-itests/src/test/resources/felix-1.9.0-SNAPSHOT.xml
    geronimo/sandbox/blueprint/pom.xml

Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java Wed Jun 17 19:06:04 2009
@@ -41,7 +41,7 @@
      * The <code>value-type</code> attribute.
      * ### Shouldnt this also support getRuntimeValueType()?
      */
-	String getValueTypeName();
+	String getValueType();
 
     /**
      * The of Metadata objects that describe the value.

Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java Wed Jun 17 19:06:04 2009
@@ -30,7 +30,7 @@
 	 * Defined in the <code>key-type</code> attribute.
 	 * ### should we have getRuntimeKeyType?
 	 */
-	String getKeyTypeName();
+	String getKeyType();
 
     /**
      * The value-type specified for the array
@@ -38,7 +38,7 @@
 	 * ### should we have getRuntimeValueType?
      * The <code>value-type</code> attribute.
      */
-	String getValueTypeName();
+	String getValueType();
 
     /**
      * The of Metadata objects that describe the value.

Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java Wed Jun 17 19:06:04 2009
@@ -66,7 +66,7 @@
 	 *
 	 * @return an immutable set of (String) type names, or an empty set if using auto-export
 	 */
-	List/*<String>*/ getInterfaceNames();
+	List/*<String>*/ getInterfaces();
 
 	/**
 	 * Return the auto-export mode specified.

Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java Wed Jun 17 19:06:04 2009
@@ -51,7 +51,7 @@
 	 *
 	 * @return the String name of the requested service interface
 	 */
-	String getInterfaceName();
+	String getInterface();
 
 	/**
 	 * The value of the component-name attribute, if specified. This specifies

Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java Wed Jun 17 19:06:04 2009
@@ -35,5 +35,5 @@
 	 *
 	 * Defined in the <code>type</code> attribute.
 	 */
-	String getTypeName();
+	String getType();
 }

Modified: geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedProperties.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedProperties.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedProperties.java (original)
+++ geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedProperties.java Wed Jun 17 19:06:04 2009
@@ -32,6 +32,8 @@
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 import org.apache.geronimo.blueprint.BeanProcessor;
 import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
@@ -147,14 +149,19 @@
         managedObjectManager.unregister(this);
     }
 
-    public void updated(Dictionary props) {
+    public void updated(final Dictionary props) {
         LOGGER.debug("Configuration updated for bean={} / pid={}", beanName, persistentId);
-        synchronized (lock) {
-            this.properties = props;
-            for (Object bean : beans) {
-                inject(bean, false);
+        // Run in a separate thread to avoid re-entrance
+        new Thread() {
+            public void run() {
+                synchronized (lock) {
+                    properties = props;
+                    for (Object bean : beans) {
+                        inject(bean, false);
+                    }
+                }
             }
-        }
+        }.start();
     }
 
     public Object beforeInit(Object bean, String beanName) {

Modified: geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java (original)
+++ geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java Wed Jun 17 19:06:04 2009
@@ -23,14 +23,21 @@
 import java.util.Collections;
 import java.util.List;
 
+import org.w3c.dom.CharacterData;
+import org.w3c.dom.Comment;
+import org.w3c.dom.Element;
+import org.w3c.dom.EntityReference;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
 import org.apache.geronimo.blueprint.ComponentDefinitionRegistry;
 import org.apache.geronimo.blueprint.NamespaceHandler;
 import org.apache.geronimo.blueprint.ParserContext;
 import org.apache.geronimo.blueprint.container.Parser;
 import org.apache.geronimo.blueprint.container.ParserContextImpl;
 import org.apache.geronimo.blueprint.container.ServiceListener;
-import org.apache.geronimo.blueprint.ext.PlaceholdersUtils;
 import org.apache.geronimo.blueprint.ext.ExtNamespaceHandler;
+import org.apache.geronimo.blueprint.ext.PlaceholdersUtils;
 import org.apache.geronimo.blueprint.mutable.MutableBeanMetadata;
 import org.apache.geronimo.blueprint.mutable.MutableCollectionMetadata;
 import org.apache.geronimo.blueprint.mutable.MutableComponentMetadata;
@@ -55,12 +62,6 @@
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.CharacterData;
-import org.w3c.dom.Comment;
-import org.w3c.dom.EntityReference;
 
 /**
  * Namespace handler for the Config Admin service.
@@ -117,7 +118,7 @@
     private static final Logger LOGGER = LoggerFactory.getLogger(CmNamespaceHandler.class);
 
     private int idCounter;
-    
+
     public URL getSchemaLocation(String namespace) {
         return getClass().getResource("blueprint-cm.xsd");
     }
@@ -404,13 +405,13 @@
         if (registry.getComponentDefinition(CONFIG_ADMIN_REFERENCE_NAME) == null) {
             MutableReferenceMetadata reference = context.createMetadata(MutableReferenceMetadata.class);
             reference.setId(CONFIG_ADMIN_REFERENCE_NAME);
-            reference.setInterfaceName(ConfigurationAdmin.class.getName());
+            reference.setInterface(ConfigurationAdmin.class.getName());
             reference.setAvailability(ReferenceMetadata.AVAILABILITY_MANDATORY);
             reference.setTimeout(300000);
             registry.registerComponentDefinition(reference);
         }
     }
-    
+
     private void registerManagedObjectManager(ParserContext context, ComponentDefinitionRegistry registry) {
         if (registry.getComponentDefinition(MANAGED_OBJECT_MANAGER_NAME) == null) {
             MutableBeanMetadata beanMetadata = context.createMetadata(MutableBeanMetadata.class);
@@ -428,7 +429,7 @@
     private static ValueMetadata createValue(ParserContext context, String value, String type) {
         MutableValueMetadata m = context.createMetadata(MutableValueMetadata.class);
         m.setStringValue(value);
-        m.setTypeName(type);
+        m.setType(type);
         return m;
     }
 
@@ -447,7 +448,7 @@
     private static CollectionMetadata createList(ParserContext context, List<String> list) {
         MutableCollectionMetadata m = context.createMetadata(MutableCollectionMetadata.class);
         m.setCollectionClass(List.class);
-        m.setValueTypeName(String.class.getName());
+        m.setValueType(String.class.getName());
         for (String v : list) {
             m.addValue(createValue(context, v, String.class.getName()));
         }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java Wed Jun 17 19:06:04 2009
@@ -172,7 +172,7 @@
             if (listenersRecipe != null) {
                 listeners = (List<Listener>) listenersRecipe.create();
                 for (Listener listener : listeners) {
-                    listener.init(loadAllClasses(Collections.singletonList(metadata.getInterfaceName())));
+                    listener.init(loadAllClasses(Collections.singletonList(metadata.getInterface())));
                 }
             } else {
                 listeners = Collections.emptyList();
@@ -201,7 +201,7 @@
             if (metadata instanceof ExtendedServiceReferenceMetadata) {
                 proxyClass = (((ExtendedServiceReferenceMetadata) metadata).getProxyMethod() & ExtendedServiceReferenceMetadata.PROXY_METHOD_CLASSES) != 0;
             }
-            List<Class> classes = loadAllClasses(Collections.singletonList(this.metadata.getInterfaceName()));
+            List<Class> classes = loadAllClasses(Collections.singletonList(this.metadata.getInterface()));
             if (!proxyClass) {
                 for (Class cl : classes) {
                     if (!cl.isInterface()) {
@@ -415,7 +415,7 @@
         }
         // Handle interfaces
         Set<String> interfaces = new HashSet<String>();
-        interfaces.add(metadata.getInterfaceName());
+        interfaces.add(metadata.getInterface());
         if (!interfaces.isEmpty()) {
             for (String itf : interfaces) {
                 members.add("(" + Constants.OBJECTCLASS + "=" + itf + ")");

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java Wed Jun 17 19:06:04 2009
@@ -37,6 +37,7 @@
 import org.apache.geronimo.blueprint.utils.ReflectionUtils;
 import static org.apache.geronimo.blueprint.utils.ReflectionUtils.getRealCause;
 import static org.apache.geronimo.blueprint.utils.TypeUtils.toClass;
+import static org.apache.geronimo.blueprint.utils.TypeUtils.isInstance;
 import org.osgi.service.blueprint.container.ComponentDefinitionException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -264,11 +265,11 @@
                 boolean found = true;
                 List<Object> match = new ArrayList<Object>();
                 for (int i = 0; i < args.size(); i++) {
-                    if (types.get(i) != null && types.get(i) != mth.getParameterTypes()[i]) {
+                    if (types.get(i) != null && !mth.getParameterTypes()[i].equals(types.get(i))) {
                         found = false;
                         break;
                     }
-                    if (!mth.getParameterTypes()[i].isInstance(args.get(i))) {
+                    if (!isInstance(mth.getParameterTypes()[i], args.get(i))) {
                         found = false;
                         break;
                     }
@@ -294,7 +295,7 @@
                 boolean found = true;
                 List<Object> match = new ArrayList<Object>();
                 for (int i = 0; i < args.size(); i++) {
-                    if (types.get(i) != null && types.get(i) != mth.getParameterTypes()[i]) {
+                    if (types.get(i) != null && !mth.getParameterTypes()[i].equals(types.get(i))) {
                         found = false;
                         break;
                     }
@@ -362,11 +363,11 @@
                 boolean found = true;
                 List<Object> match = new ArrayList<Object>();
                 for (int i = 0; i < args.size(); i++) {
-                    if (types.get(i) != null && types.get(i) != cns.getParameterTypes()[i]) {
+                    if (types.get(i) != null && !cns.getParameterTypes()[i].equals(types.get(i))) {
                         found = false;
                         break;
                     }
-                    if (!cns.getParameterTypes()[i].isInstance(args.get(i))) {
+                    if (!isInstance(cns.getParameterTypes()[i], args.get(i))) {
                         found = false;
                         break;
                     }
@@ -392,7 +393,7 @@
                 boolean found = true;
                 List<Object> match = new ArrayList<Object>();
                 for (int i = 0; i < args.size(); i++) {
-                    if (types.get(i) != null && types.get(i) != cns.getParameterTypes()[i]) {
+                    if (types.get(i) != null && !cns.getParameterTypes()[i].equals(types.get(i))) {
                         found = false;
                         break;
                     }
@@ -676,13 +677,17 @@
                         continue;
                     }
                 } else if (arg != null) {
-                    if (!convert && !toClass(entry.type).isInstance(arg)) {
-                        continue;
-                    }
-                    try {
-                        val = convert(arg, entry.type);
-                    } catch (Throwable t) {
-                        continue;
+                    if (convert) {
+                        try {
+                            // TODO: call canConvert instead of convert()
+                            val = convert(arg, entry.type);
+                        } catch (Throwable t) {
+                            continue;
+                        }
+                    } else {
+                        if (!isInstance(entry.type, arg)) {
+                            continue;
+                        }
                     }
                 }
                 entry.argument = val;

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java Wed Jun 17 19:06:04 2009
@@ -42,8 +42,6 @@
 import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
 import org.apache.geronimo.blueprint.NamespaceHandler;
 import org.apache.geronimo.blueprint.Processor;
-import org.apache.geronimo.blueprint.di.DefaultExecutionContext;
-import org.apache.geronimo.blueprint.di.ExecutionContext;
 import org.apache.geronimo.blueprint.di.Recipe;
 import org.apache.geronimo.blueprint.di.Repository;
 import org.apache.geronimo.blueprint.namespace.ComponentDefinitionRegistryImpl;
@@ -112,9 +110,10 @@
     private State state = State.Unknown;
     private boolean destroyed;
     private Parser parser;
-    private BlueprintObjectInstantiator instantiator;
+    private BlueprintRepository repository;
     private ServiceRegistration registration;
     private List<Processor> processors;
+    private final Object satisfiablesLock = new Object();
     private Map<String, List<SatisfiableRecipe>> satisfiables;
     private long timeout = 5 * 60 * 1000;
     private boolean waitForDependencies = true;
@@ -122,6 +121,7 @@
     private ScheduledFuture timeoutFuture;
     private final AtomicBoolean scheduled = new AtomicBoolean();
     private final AtomicBoolean running = new AtomicBoolean();
+    private List<ServiceRecipe> services;
 
     public BlueprintContainerImpl(BundleContext bundleContext, Bundle extenderBundle, BlueprintListener eventDispatcher, NamespaceHandlerRegistry handlers, ScheduledExecutorService executors, List<URL> urls) {
         this.bundleContext = bundleContext;
@@ -137,7 +137,7 @@
 
     public int getCompliance() {
         // TODO
-        return 0;
+        return COMPLIANCE_STRICT;
     }
 
     public Bundle getExtenderBundle() {
@@ -248,7 +248,7 @@
                         break;
                     }
                     case Populated:
-                        getInstantiator();
+                        getRepository();
                         trackServiceReferences();
                         Runnable r = new Runnable() {
                             public void run() {
@@ -322,11 +322,11 @@
         }
     }
 
-    protected BlueprintObjectInstantiator getInstantiator() throws Exception {
-        if (instantiator == null) {
-            instantiator = new BlueprintObjectInstantiator(this, new RecipeBuilder(this).createRepository());
+    public BlueprintRepository getRepository() {
+        if (repository == null) {
+            repository = new RecipeBuilder(this).createRepository();
         }
-        return instantiator;
+        return repository;
     }
 
     private void processTypeConverters() throws Exception {
@@ -341,7 +341,7 @@
             }
         }
 
-        Map<String, Object> objects = instantiator.createAll(typeConverters.toArray(new String[typeConverters.size()]));
+        Map<String, Object> objects = repository.createAll(typeConverters);
         for (Object obj : objects.values()) {
             if (obj instanceof Converter) {
                 converter.registerConverter((Converter) obj);
@@ -365,43 +365,47 @@
                 continue;
             }
             if (ComponentDefinitionRegistryProcessor.class.isAssignableFrom(clazz)) {
-                Object obj = instantiator.create(bean.getId());
+                Object obj = repository.create(bean.getId());
                 ((ComponentDefinitionRegistryProcessor) obj).process(componentDefinitionRegistry);
-                // Update repository with recipes processed by the processors
-                untrackServiceReferences();
-                Repository repository = instantiator.getRepository();
-                Repository tmpRepo = new RecipeBuilder(this).createRepository();
-                for (String name : tmpRepo.getNames()) {
-                    if (repository.getInstance(name) == null) {
-                        repository.putRecipe(name, tmpRepo.getRecipe(name));
-                    }
-                }
-                satisfiables = null;
-                trackServiceReferences();
             } else if (Processor.class.isAssignableFrom(clazz)) {
-                Object obj = instantiator.create(bean.getId());
+                Object obj = repository.create(bean.getId());
                 this.processors.add((Processor) obj);
+            } else {
+                continue;
             }
+            // Update repository with recipes processed by the processors
+            untrackServiceReferences();
+            Repository tmpRepo = new RecipeBuilder(this).createRepository();
+            for (String name : tmpRepo.getNames()) {
+                if (repository.getInstance(name) == null) {
+                    Recipe r = tmpRepo.getRecipe(name);
+                    if (r != null) {
+                        repository.putRecipe(name, r);
+                    }
+                }
+            }
+            getSatisfiableDependenciesMap(true);
+            trackServiceReferences();
         }
     }
 
     private Map<String, List<SatisfiableRecipe>> getSatisfiableDependenciesMap() {
-        if (satisfiables == null && instantiator != null) {
-            ExecutionContext oldContext = ExecutionContext.setContext(new DefaultExecutionContext(this, instantiator.getRepository()));
-            try {
+        return getSatisfiableDependenciesMap(false);
+    }
+
+    private Map<String, List<SatisfiableRecipe>> getSatisfiableDependenciesMap(boolean recompute) {
+        synchronized (satisfiablesLock) {
+            if ((recompute || satisfiables == null) && repository != null) {
                 satisfiables = new HashMap<String, List<SatisfiableRecipe>>();
-                for (Recipe r : instantiator.getAllRecipes()) {
-                    List<SatisfiableRecipe> recipes = instantiator.getAllRecipes(SatisfiableRecipe.class, r.getName());
+                for (Recipe r : repository.getAllRecipes()) {
+                    List<SatisfiableRecipe> recipes = repository.getAllRecipes(SatisfiableRecipe.class, r.getName());
                     if (!recipes.isEmpty()) {
                         satisfiables.put(r.getName(), recipes);
                     }
                 }
-                return satisfiables;
-            } finally {
-                ExecutionContext.setContext(oldContext);
             }
+            return satisfiables;
         }
-        return satisfiables;
     }
 
     private void trackServiceReferences() {
@@ -452,7 +456,7 @@
                 String name = entry.getKey();
                 ComponentMetadata metadata = componentDefinitionRegistry.getComponentDefinition(name);
                 if (metadata instanceof ServiceMetadata) {
-                    ServiceRecipe reg = (ServiceRecipe) instantiator.getRepository().getRecipe(name);
+                    ServiceRecipe reg = (ServiceRecipe) repository.getRecipe(name);
                     synchronized (reg) {
                         boolean satisfied = true;
                         for (SatisfiableRecipe recipe : entry.getValue()) {
@@ -492,7 +496,7 @@
         }
         LOGGER.debug("Instantiating components: {}", components);
         try {
-            instantiator.createAll(components);
+            repository.createAll(components);
         } catch (ComponentDefinitionException e) {
             throw e;
         } catch (Throwable t) {
@@ -501,8 +505,8 @@
     }
 
     private void registerServices() {
-        List<ServiceRecipe> recipes = instantiator.getAllRecipes(ServiceRecipe.class);
-        for (ServiceRecipe r : recipes) {
+        services = repository.getAllRecipes(ServiceRecipe.class);
+        for (ServiceRecipe r : services) {
             List<SatisfiableRecipe> dependencies = getSatisfiableDependenciesMap().get(r.getName());
             boolean satisfied = true;
             if (dependencies != null) {
@@ -520,17 +524,20 @@
     }
 
     private void unregisterServices() {
-        if (instantiator != null) {
-            List<ServiceRecipe> recipes = instantiator.getAllRecipes(ServiceRecipe.class);
-            for (ServiceRecipe r : recipes) {
-                r.unregister();
+        if (repository != null) {
+            List<ServiceRecipe> recipes = this.services;
+            this.services = null;
+            if (recipes != null) {
+                for (ServiceRecipe r : recipes) {
+                    r.unregister();
+                }
             }
         }
     }
 
     private void destroyComponents() {
-        if (instantiator != null) {
-            instantiator.getRepository().destroy();
+        if (repository != null) {
+            repository.destroy();
         }
     }
 
@@ -556,12 +563,12 @@
     }
     
     public Object getComponentInstance(String id) throws NoSuchComponentException {
-        if (instantiator == null) {
+        if (repository == null) {
             throw new NoSuchComponentException(id);
         }
         try {
             LOGGER.debug("Instantiating component {}", id);
-            return instantiator.create(id);
+            return repository.create(id);
         } catch (ComponentDefinitionException e) {
             throw e;
         } catch (Throwable t) {
@@ -637,10 +644,6 @@
         }
     }
 
-    public Repository getRepository() {
-        return instantiator.getRepository();
-    }
-    
     public Converter getConverter() {
         return converter;
     }

Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintRepository.java (from r784675, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/DefaultRepository.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintRepository.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintRepository.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/DefaultRepository.java&r1=784675&r2=785758&rev=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/DefaultRepository.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintRepository.java Wed Jun 17 19:06:04 2009
@@ -15,62 +15,83 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.blueprint.di;
+package org.apache.geronimo.blueprint.container;
 
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
-import java.util.ListIterator;
 import java.util.Map;
 import java.util.Set;
-import java.util.TreeMap;
 import java.util.LinkedHashMap;
 import java.util.HashMap;
 import java.util.Collections;
+import java.util.Collection;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.Iterator;
+import java.util.concurrent.ConcurrentHashMap;
+import java.lang.reflect.Type;
 
 import org.osgi.service.blueprint.container.ComponentDefinitionException;
+import org.osgi.service.blueprint.container.NoSuchComponentException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.apache.geronimo.blueprint.di.Repository;
+import org.apache.geronimo.blueprint.di.Recipe;
+import org.apache.geronimo.blueprint.di.ExecutionContext;
+import org.apache.geronimo.blueprint.di.RefRecipe;
+import org.apache.geronimo.blueprint.di.IdRefRecipe;
+import org.apache.geronimo.blueprint.di.CircularDependencyException;
+import org.apache.geronimo.blueprint.utils.ConversionUtils;
+import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
 
 /**
  * The default repository implementation
  */
-public class DefaultRepository implements Repository {
+public class BlueprintRepository implements Repository, ExecutionContext {
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(DefaultRepository.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(BlueprintRepository.class);
 
-    private Map<String, Object> defaults;
-    private Map<String, Recipe> recipes;
-    private Map<String, Object> instances;
-
-    public DefaultRepository() {
-        recipes = new HashMap<String, Recipe>();
-        defaults = new HashMap<String, Object>();
-        instances = new LinkedHashMap<String, Object>();
-    }
-    
-    public DefaultRepository(DefaultRepository source) {
-        recipes = new HashMap<String, Recipe>(source.recipes);
-        defaults = new HashMap<String, Object>();
-        instances = new LinkedHashMap<String, Object>(source.instances);
-    }
+    /**
+     * The blueprint container
+     */
+    private final ExtendedBlueprintContainer blueprintContainer;
+
+    /**
+     * Contains environment objects
+     */
+    private final Map<String, Object> defaults = new ConcurrentHashMap<String, Object>();
+
+    /**
+     * Contains object recipes
+     */
+    private final Map<String, Recipe> recipes = new ConcurrentHashMap<String, Recipe>();
+
+    /**
+     * Contains object instances
+     */
+    private final Map<String, Object> instances = new ConcurrentHashMap<String, Object>();
+
+    /**
+     * Lock for object instance creation
+     */
+    private final Object instanceLock = new Object();
+
+    /**
+     * Contains partial objects.
+     */
+    private final Map<String, Object> partialObjects = new ConcurrentHashMap<String, Object>();
+
+    /**
+     * Before each recipe is executed it is pushed on the stack.  The
+     * stack is used to detect circular dependencies.
+     */
+    private final LinkedList<Recipe> stack = new LinkedList<Recipe>();
 
-    public void set(String name, Object instance) {
-        if (instance instanceof Recipe) {
-            recipes.put(name, (Recipe) instance);
-        } else {
-            instances.put(name, instance);
-        }
+    public BlueprintRepository(ExtendedBlueprintContainer container) {
+        blueprintContainer = container;
     }
     
-    public boolean contains(String name) {
-        return recipes.containsKey(name) || instances.containsKey(name) || defaults.containsKey(name);
-    }
-
-    public Object get(String name) {
-        return instances.get(name) != null ? instances.get(name) : (recipes.get(name) != null ? recipes.get(name) : defaults.get(name));
-    }
-
     public Object getInstance(String name) {
         return instances.get(name);
     }
@@ -92,7 +113,11 @@
     }
 
     public void putDefault(String name, Object instance) {
-        defaults.put(name, instance);
+        if (instance != null) {
+            defaults.put(name, instance);
+        } else {
+            defaults.remove(name);
+        }
     }
 
     public void putRecipe(String name, Recipe recipe) {
@@ -102,11 +127,109 @@
         recipes.put(name, recipe);
     }
 
-    public void putInstance(String name, Object instance) {
-        if (instances.get(name) != null) {
-            throw new ComponentDefinitionException("Name " + name + " is already registered to instance " + instances.get(name));
+    public Object create(String name) throws ComponentDefinitionException {
+        Map<String, Object> instances = createAll(Arrays.asList(name));
+        return instances.get(name);
+    }
+
+    public Map<String, Object> createAll(String... names) throws ComponentDefinitionException {
+        return createAll(Arrays.asList(names));
+    }
+
+    public Map<String, Object> createAll(Collection<String> names) throws ComponentDefinitionException {
+        ExecutionContext oldContext = ExecutionContext.Holder.setContext(this);
+        try {
+            Map<String, Object> instances = new LinkedHashMap<String, Object>();
+            for (String name : names) {
+                Object obj = createInstance(name);
+                try {
+                    // Make sure to go through the conversion step in case we have a Convertible object
+                    obj = ConversionUtils.convert(obj, Object.class, blueprintContainer.getConverter());
+                } catch (Exception e) {
+                    throw new ComponentDefinitionException("Unable to convert instance " + name, e);
+                }
+                instances.put(name, obj);
+            }
+            return instances;
+        } finally {
+            ExecutionContext.Holder.setContext(oldContext);
+        }
+    }
+
+    public <T> List<T> getAllRecipes(Class<T> clazz, String... names) {
+        List<T> recipes = new ArrayList<T>();
+        for (Recipe r : getAllRecipes(names)) {
+            if (clazz.isInstance(r)) {
+                recipes.add(clazz.cast(r));
+            }
+        }
+        return recipes;
+    }
+
+    public Set<Recipe> getAllRecipes(String... names) {
+        ExecutionContext oldContext = ExecutionContext.Holder.setContext(this);
+        try {
+            Set<Recipe> allRecipes = new HashSet<Recipe>();
+            Collection<String> topLevel = names != null && names.length > 0 ? Arrays.asList(names) : recipes.keySet();
+            for (String name : topLevel) {
+                internalGetAllRecipes(allRecipes, getRecipe(name));
+            }
+            return allRecipes;
+        } finally {
+            ExecutionContext.Holder.setContext(oldContext);
+        }
+    }
+
+    /*
+     * This method should not be called directly, only from one of the getAllRecipes() methods.
+     */
+    private void internalGetAllRecipes(Set<Recipe> allRecipes, Recipe r) {
+        if (r != null) {
+            if (allRecipes.add(r)) {
+                for (Recipe c : r.getDependencies()) {
+                    internalGetAllRecipes(allRecipes, c);
+                }
+            }
+        }
+    }
+
+    private Object createInstance(String name) {
+        // We need to synchronize recipe creation on the repository
+        // so that we don't end up with multiple threads creating the
+        // same instance at the same time.
+        Object instance = getInstance(name);
+        if (instance == null) {
+            synchronized (instanceLock) {
+                instance = getInstance(name);
+                if (instance == null) {
+                    Recipe recipe = getRecipe(name);
+                    if (recipe != null) {
+                        instance = recipe.create();
+                    }
+                }
+            }
+        }
+        if (instance == null) {
+            instance = getDefault(name);
+        }
+        if (instance == null) {
+            throw new NoSuchComponentException(name);
+        }
+        return instance;
+    }
+
+    public void checkReferences() {
+        for (Recipe recipe : getAllRecipes()) {
+            String ref = null;
+            if (recipe instanceof RefRecipe) {
+                ref = ((RefRecipe) recipe).getIdRef();
+            } else if (recipe instanceof IdRefRecipe) {
+                ref = ((IdRefRecipe) recipe).getIdRef();
+            }
+            if (ref != null && getRecipe(ref) == null && getDefault(ref) == null) {
+                throw new ComponentDefinitionException("Unresolved ref/idref to component: " + ref);
+            }
         }
-        instances.put(name, instance);
     }
 
     public void destroy() {
@@ -121,5 +244,81 @@
         }
         instances.clear();
     }
-    
+
+    public Object getInstanceLock() {
+        return instanceLock;
+    }
+
+    public void push(Recipe recipe) {
+        if (stack.contains(recipe)) {
+            ArrayList<Recipe> circularity = new ArrayList<Recipe>(stack.subList(stack.indexOf(recipe), stack.size()));
+
+            // remove anonymous nodes from circularity list
+            for (Iterator<Recipe> iterator = circularity.iterator(); iterator.hasNext();) {
+                Recipe item = iterator.next();
+                if (item != recipe && item.getName() == null) {
+                    iterator.remove();
+                }
+            }
+
+            // add ending node to list so a full circuit is shown
+            circularity.add(recipe);
+
+            throw new CircularDependencyException(circularity);
+        }
+        stack.add(recipe);
+    }
+
+    public Recipe pop() {
+        return stack.removeLast();
+    }
+
+    public LinkedList<Recipe> getStack() {
+        return new LinkedList<Recipe>(stack);
+    }
+
+    public boolean containsObject(String name) {
+        return getInstance(name) != null
+                || getRecipe(name) != null
+                || getDefault(name) != null;
+    }
+
+    public Object getObject(String name) {
+        Object object = getInstance(name);
+        if (object == null) {
+            object = getRecipe(name);
+        }
+        if (object == null) {
+            object = getDefault(name);
+        }
+        return object;
+    }
+
+    public void addObject(String name, Object object, boolean partialObject) {
+        if (partialObject) {
+            partialObjects.put(name, object);
+        } else {
+            if (instances.get(name) != null) {
+                throw new ComponentDefinitionException("Name " + name + " is already registered to instance " + instances.get(name));
+            }
+            instances.put(name, object);
+            partialObjects.remove(name);
+        }
+    }
+
+    public Object getPartialObject(String name) {
+        Object obj = partialObjects.get(name);
+        if (obj == null) {
+            obj = getInstance(name);
+        }
+        return obj;
+    }
+
+    public Object convert(Object value, Type type) throws Exception {
+        return ConversionUtils.convert(value, type, blueprintContainer.getConverter());
+    }
+
+    public Class loadClass(String typeName) throws ClassNotFoundException {
+        return blueprintContainer.loadClass(typeName);
+    }
 }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java Wed Jun 17 19:06:04 2009
@@ -628,7 +628,7 @@
             throw new ComponentDefinitionException("One of " + REF_ATTRIBUTE + " attribute, " + BEAN_ELEMENT + " element or " + REF_ELEMENT + " element must be set");
         }
         // Check interface
-        if (service.getAutoExport() == ServiceMetadata.AUTO_EXPORT_DISABLED && service.getInterfaceNames().isEmpty()) {
+        if (service.getAutoExport() == ServiceMetadata.AUTO_EXPORT_DISABLED && service.getInterfaces().isEmpty()) {
             throw new ComponentDefinitionException(INTERFACE_ATTRIBUTE + " attribute or " + INTERFACES_ELEMENT + " element must be set when " + AUTO_EXPORT_ATTRIBUTE + " is set to " + AUTO_EXPORT_DISABLED);
         }
         
@@ -923,7 +923,7 @@
             reference.setDependsOn(parseList(element.getAttribute(DEPENDS_ON_ATTRIBUTE)));
         }
         if (element.hasAttribute(INTERFACE_ATTRIBUTE)) {
-            reference.setInterfaceName(element.getAttribute(INTERFACE_ATTRIBUTE));
+            reference.setInterface(element.getAttribute(INTERFACE_ATTRIBUTE));
         }
         if (element.hasAttribute(FILTER_ATTRIBUTE)) {
             reference.setFilter(element.getAttribute(FILTER_ATTRIBUTE));

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java Wed Jun 17 19:06:04 2009
@@ -30,7 +30,7 @@
 import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
 import org.apache.geronimo.blueprint.di.ArrayRecipe;
 import org.apache.geronimo.blueprint.di.CollectionRecipe;
-import org.apache.geronimo.blueprint.di.DefaultRepository;
+import org.apache.geronimo.blueprint.container.BlueprintRepository;
 import org.apache.geronimo.blueprint.di.IdRefRecipe;
 import org.apache.geronimo.blueprint.di.MapRecipe;
 import org.apache.geronimo.blueprint.di.Recipe;
@@ -86,8 +86,8 @@
         }
     }
     
-    public Repository createRepository() throws Exception {
-        Repository repository = new DefaultRepository();
+    public BlueprintRepository createRepository() {
+        BlueprintRepository repository = new BlueprintRepository(blueprintContainer);
         addBuiltinComponents(repository);
         // Create component recipes
         for (String name : registry.getComponentDefinitionNames()) {
@@ -95,10 +95,11 @@
             Recipe recipe = createRecipe(component);
             repository.putRecipe(recipe.getName(), recipe);
         }
+        repository.checkReferences();
         return repository;
     }
 
-    public Recipe createRecipe(ComponentMetadata component) throws Exception {
+    public Recipe createRecipe(ComponentMetadata component) {
         if (component instanceof BeanMetadata) {
             return createBeanRecipe((BeanMetadata) component);
         } else if (component instanceof ServiceMetadata) {
@@ -112,7 +113,7 @@
         }
     }
 
-    private Recipe createRefCollectionRecipe(RefListMetadata metadata) throws Exception {
+    private Recipe createRefCollectionRecipe(RefListMetadata metadata) {
         CollectionRecipe listenersRecipe = null;
         if (metadata.getReferenceListeners() != null) {
             listenersRecipe = new CollectionRecipe(getName(null), ArrayList.class);
@@ -132,7 +133,7 @@
         return recipe;
     }
 
-    private ReferenceRecipe createReferenceRecipe(ReferenceMetadata metadata) throws Exception {
+    private ReferenceRecipe createReferenceRecipe(ReferenceMetadata metadata) {
         CollectionRecipe listenersRecipe = null;
         if (metadata.getReferenceListeners() != null) {
             listenersRecipe = new CollectionRecipe(getName(null), ArrayList.class);
@@ -152,7 +153,7 @@
         return recipe;
     }
 
-    private Recipe createServiceRecipe(ServiceMetadata serviceExport) throws Exception {
+    private Recipe createServiceRecipe(ServiceMetadata serviceExport) {
         CollectionRecipe listenersRecipe = new CollectionRecipe(getName(null), ArrayList.class);
         if (serviceExport.getRegistrationListeners() != null) {
             for (RegistrationListener listener : serviceExport.getRegistrationListeners()) {
@@ -173,7 +174,7 @@
         return recipe;
     }
 
-    protected MapRecipe getServicePropertiesRecipe(ServiceMetadata metadata) throws Exception {
+    protected MapRecipe getServicePropertiesRecipe(ServiceMetadata metadata) {
         List<MapEntry> properties = metadata.getServiceProperties();
         if (properties != null) {
             MutableMapMetadata map = MetadataUtil.createMetadata(MutableMapMetadata.class);
@@ -186,7 +187,7 @@
         }
     }
     
-    private BeanRecipe createBeanRecipe(BeanMetadata beanMetadata) throws Exception {
+    private BeanRecipe createBeanRecipe(BeanMetadata beanMetadata) {
         BeanRecipe recipe = new BeanRecipe(
                 getName(beanMetadata.getId()),
                 blueprintContainer,
@@ -232,7 +233,7 @@
         return recipe;
     }
 
-    private Recipe createRecipe(RegistrationListener listener) throws Exception {
+    private Recipe createRecipe(RegistrationListener listener) {
         BeanRecipe recipe = new BeanRecipe(getName(null), blueprintContainer, ServiceListener.class);
         recipe.setProperty("listener", getValue(listener.getListenerComponent(), null));
         if (listener.getRegistrationMethod() != null) {
@@ -244,21 +245,21 @@
         return recipe;
     }
 
-    private Recipe createRecipe(ReferenceListener listener) throws Exception {
+    private Recipe createRecipe(ReferenceListener listener) {
         BeanRecipe recipe = new BeanRecipe(getName(null), blueprintContainer, AbstractServiceReferenceRecipe.Listener.class);
         recipe.setProperty("listener", getValue(listener.getListenerComponent(), null));
         recipe.setProperty("metadata", listener);
         return recipe;
     }
 
-    private Recipe getValue(Metadata v, Object groupingType) throws Exception {
+    private Recipe getValue(Metadata v, Object groupingType) {
         if (v instanceof NullMetadata) {
             return null;
         } else if (v instanceof ComponentMetadata) {
             return createRecipe((ComponentMetadata) v);
         } else if (v instanceof ValueMetadata) {
             ValueMetadata stringValue = (ValueMetadata) v;
-            Object type = stringValue.getTypeName();
+            Object type = stringValue.getType();
             type = (type == null) ? groupingType : type;
             ValueRecipe vr = new ValueRecipe(getName(null), stringValue, type);
             return vr;
@@ -270,7 +271,7 @@
         } else if (v instanceof CollectionMetadata) {
             CollectionMetadata collectionMetadata = (CollectionMetadata) v;
             Class cl = collectionMetadata.getCollectionClass();
-            Object type = collectionMetadata.getValueTypeName();
+            Object type = collectionMetadata.getValueType();
             if (cl == Object[].class) {
                 ArrayRecipe ar = new ArrayRecipe(getName(null), type);
                 for (Metadata lv : collectionMetadata.getValues()) {
@@ -305,9 +306,9 @@
         }
     }
 
-    private MapRecipe createMapRecipe(MapMetadata mapValue) throws Exception {
-        String keyType = mapValue.getKeyTypeName();
-        String valueType = mapValue.getValueTypeName();
+    private MapRecipe createMapRecipe(MapMetadata mapValue) {
+        String keyType = mapValue.getKeyType();
+        String valueType = mapValue.getValueType();
         MapRecipe mr = new MapRecipe(getName(null), HashMap.class);
         for (MapEntry entry : mapValue.getEntries()) {
             Recipe key = getValue(entry.getKey(), keyType);

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefListRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefListRecipe.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefListRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RefListRecipe.java Wed Jun 17 19:06:04 2009
@@ -129,7 +129,7 @@
                     }
                 } else {
                     dispatcher = new ServiceDispatcher(reference);
-                    List<String> interfaces = Collections.singletonList(metadata.getInterfaceName());
+                    List<String> interfaces = Collections.singletonList(metadata.getInterface());
                     if (metadata instanceof ExtendedRefListMetadata) {
                         boolean greedy = (((ExtendedRefListMetadata) metadata).getProxyMethod() & ExtendedRefListMetadata.PROXY_METHOD_GREEDY) != 0;
                         if (greedy) {

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ReferenceRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ReferenceRecipe.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ReferenceRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ReferenceRecipe.java Wed Jun 17 19:06:04 2009
@@ -71,7 +71,7 @@
                 }
             }
             // Create the proxy
-            proxy = createProxy(new ServiceDispatcher(), Collections.singletonList(this.metadata.getInterfaceName()));
+            proxy = createProxy(new ServiceDispatcher(), Collections.singletonList(this.metadata.getInterface()));
 
             // Add partially created proxy to the context
             ServiceProxyWrapper wrapper = new ServiceProxyWrapper();
@@ -156,6 +156,7 @@
                 blueprintContainer.getBundleContext().ungetService(trackedServiceReference);
                 trackedServiceReference = null;
                 trackedService = null;
+                monitor.notifyAll();
             }
         }
     }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java Wed Jun 17 19:06:04 2009
@@ -73,6 +73,7 @@
     private Map registrationProperties;
     private List<ServiceListener> listeners;
     private Object service;
+    private final Object serviceLock = new Object();
     private boolean prototypeService;
 
     public ServiceRecipe(String name,
@@ -211,8 +212,8 @@
      * @return
      */
     private Object internalGetService(Bundle bundle, ServiceRegistration registration) {
-        synchronized (blueprintContainer.getRepository()) {
-            LOGGER.debug("Retrieving service for bundle {} and service registration {}", bundle, registration);
+        LOGGER.debug("Retrieving service for bundle {} and service registration {}", bundle, registration);
+        synchronized (serviceLock) {
             // Create initial service
             if (this.service == null) {
                 try {
@@ -239,18 +240,18 @@
                     throw e;
                 }
             }
-            Object service = this.service;
-            if (service instanceof ServiceFactory) {
-                service = ((ServiceFactory) service).getService(bundle, registration);
-            } else if (prototypeService && bundle != blueprintContainer.getBundleContext().getBundle()) {
-                service = createInstance();
-                LOGGER.debug("Created service instance for bundle: " + bundle + " " + service.hashCode());
-            }
-            if (service == null) {
-                throw new IllegalStateException("service is null");
-            }
-            return service;
         }
+        Object service = this.service;
+        if (service instanceof ServiceFactory) {
+            service = ((ServiceFactory) service).getService(bundle, registration);
+        } else if (prototypeService && bundle != blueprintContainer.getBundleContext().getBundle()) {
+            service = createInstance();
+            LOGGER.debug("Created service instance for bundle: " + bundle + " " + service.hashCode());
+        }
+        if (service == null) {
+            throw new IllegalStateException("service is null");
+        }
+        return service;
     }
 
     public synchronized Object getService(Bundle bundle, ServiceRegistration registration) {
@@ -281,7 +282,7 @@
                 classes = ReflectionUtils.getImplementedInterfaces(classes, internalGetService().getClass());
                 break;
             default:
-                classes = new HashSet<String>(metadata.getInterfaceNames());
+                classes = new HashSet<String>(metadata.getInterfaces());
                 break;
         }
         return classes;
@@ -294,14 +295,10 @@
     private Object createRecipe(Recipe recipe) {
         String name = recipe.getName();
         Repository repo = blueprintContainer.getRepository();
-        synchronized (repo) {
-            if (repo.getRecipe(name) != recipe) {
-                repo.putRecipe(name, recipe);
-            }
-            // TODO: the instantiator should be retrieved from the blueprint container instead of creating a new one
-            BlueprintObjectInstantiator graph = new BlueprintObjectInstantiator(blueprintContainer, repo);
-            return graph.create(name);
+        if (repo.getRecipe(name) != recipe) {
+            repo.putRecipe(name, recipe);
         }
+        return repo.create(name);
     }
 
     private void destroyInstance(Object instance) {

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/AbstractRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/AbstractRecipe.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/AbstractRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/AbstractRecipe.java Wed Jun 17 19:06:04 2009
@@ -51,26 +51,28 @@
 
     public final Object create() throws ComponentDefinitionException {
         // Ensure a container has been set
-        ExecutionContext context = ExecutionContext.getContext();
+        ExecutionContext context = ExecutionContext.Holder.getContext();
 
-        // if this recipe has already been executed in this container, return the currently registered value
-        Object obj = context.getPartialObject(name);
-        if (obj != null) {
-            return obj;
-        }
+        synchronized (context.getInstanceLock()) {
+            // if this recipe has already been executed in this container, return the currently registered value
+            Object obj = context.getPartialObject(name);
+            if (obj != null) {
+                return obj;
+            }
 
-        // execute the recipe
-        context.push(this);
-        try {
-            obj = internalCreate();
-            addObject(obj, false);
-            return obj;
-        } finally {
-            Recipe popped = context.pop();
-            if (popped != this) {
-                //noinspection ThrowFromFinallyBlock
-                throw new IllegalStateException("Internal Error: recipe stack is corrupt:" +
-                        " Expected " + this + " to be popped of the stack but " + popped + " was");
+            // execute the recipe
+            context.push(this);
+            try {
+                obj = internalCreate();
+                addObject(obj, false);
+                return obj;
+            } finally {
+                Recipe popped = context.pop();
+                if (popped != this) {
+                    //noinspection ThrowFromFinallyBlock
+                    throw new IllegalStateException("Internal Error: recipe stack is corrupt:" +
+                            " Expected " + this + " to be popped of the stack but was " + popped);
+                }
             }
         }
     }
@@ -81,11 +83,11 @@
         if (prototype) {
             return;
         }
-        ExecutionContext.getContext().addObject(name, obj, partial);
+        ExecutionContext.Holder.getContext().addObject(name, obj, partial);
     }
     
     protected Object convert(Object obj, Type type) throws Exception {
-        return ExecutionContext.getContext().convert(obj, type);
+        return ExecutionContext.Holder.getContext().convert(obj, type);
     }
 
     protected Class loadClass(String className) {
@@ -101,7 +103,7 @@
             return null;
         }
         try {
-            return TypeUtils.parseJavaType(typeName, fromClassLoader != null ? fromClassLoader : ExecutionContext.getContext());
+            return TypeUtils.parseJavaType(typeName, fromClassLoader != null ? fromClassLoader : ExecutionContext.Holder.getContext());
         } catch (ClassNotFoundException e) {
             throw new ComponentDefinitionException("Unable to load class " + typeName + " from recipe " + this, e);
         }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ExecutionContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ExecutionContext.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ExecutionContext.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ExecutionContext.java Wed Jun 17 19:06:04 2009
@@ -20,31 +20,37 @@
 import java.lang.reflect.Type;
 import java.util.List;
 
-public abstract class ExecutionContext {
+public interface ExecutionContext {
 
-    private static final ThreadLocal<ExecutionContext> context = new ThreadLocal<ExecutionContext>();
+    public static final class Holder {
 
-    public static boolean isContextSet() {
-        return context.get() != null;
-    }
+        private static final ThreadLocal<ExecutionContext> context = new ThreadLocal<ExecutionContext>();
 
-    public static ExecutionContext getContext() {
-        ExecutionContext executionContext = context.get();
-        if (executionContext == null) {
-            throw new IllegalStateException("Execution container has not been set");
+        private Holder() {
+        }
+
+        public static ExecutionContext getContext() {
+            ExecutionContext executionContext = context.get();
+            if (executionContext == null) {
+                throw new IllegalStateException("Execution container has not been set");
+            }
+            return executionContext;
         }
-        return executionContext;
-    }
 
-    public static ExecutionContext setContext(ExecutionContext newContext) {
-        ExecutionContext oldContext = context.get();
-        if (oldContext == null || newContext == null || oldContext.getContextKey() != newContext.getContextKey()) {
+        public static ExecutionContext setContext(ExecutionContext newContext) {
+            ExecutionContext oldContext = context.get();
             context.set(newContext);
+            return oldContext;
         }
-        return oldContext;
+
     }
 
-    public abstract Object getContextKey();
+    /**
+     * Lock that should be used to synchronized creation of singletons
+     * 
+     * @return
+     */
+    public Object getInstanceLock();
 
     /**
      * Adds a recipe to the top of the execution stack.  If the recipe is already on

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/IdRefRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/IdRefRecipe.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/IdRefRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/IdRefRecipe.java Wed Jun 17 19:06:04 2009
@@ -42,7 +42,7 @@
     }
 
     public List<Recipe> getDependencies() {
-        Recipe recipe = ExecutionContext.getContext().getRecipe(idRef);
+        Recipe recipe = ExecutionContext.Holder.getContext().getRecipe(idRef);
         if (recipe != null) {
             return Collections.singletonList(recipe);
         } else {
@@ -51,7 +51,7 @@
     }
 
     protected Object internalCreate() throws ComponentDefinitionException {
-        ExecutionContext context = ExecutionContext.getContext();
+        ExecutionContext context = ExecutionContext.Holder.getContext();
         if (!context.containsObject(idRef)) {
             throw new NoSuchComponentException(idRef);
         }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/RefRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/RefRecipe.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/RefRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/RefRecipe.java Wed Jun 17 19:06:04 2009
@@ -41,7 +41,7 @@
     }
 
     public List<Recipe> getDependencies() {
-        Recipe recipe = ExecutionContext.getContext().getRecipe(idRef);
+        Recipe recipe = ExecutionContext.Holder.getContext().getRecipe(idRef);
         if (recipe != null) {
             return Collections.singletonList(recipe);
         } else {
@@ -50,7 +50,7 @@
     }
 
     protected Object internalCreate() throws ComponentDefinitionException {
-        ExecutionContext context = ExecutionContext.getContext();
+        ExecutionContext context = ExecutionContext.Holder.getContext();
         if (!context.containsObject(idRef)) {
             throw new NoSuchComponentException(idRef);
         }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Repository.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Repository.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Repository.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Repository.java Wed Jun 17 19:06:04 2009
@@ -18,6 +18,11 @@
 package org.apache.geronimo.blueprint.di;
 
 import java.util.Set;
+import java.util.Map;
+import java.util.Collection;
+import java.util.List;
+
+import org.osgi.service.blueprint.container.ComponentDefinitionException;
 
 public interface Repository {
 
@@ -27,18 +32,45 @@
      */
     Set<String> getNames();
 
+    /**
+     * Return the singleton instance for the given name.
+     * This method will not create the object if it has been created yet.
+     *
+     * @param name
+     * @return the instance or <code>null</code>
+     */
     Object getInstance(String name);
 
+    /**
+     * Return the recipe for the given name.
+     *
+     * @param name
+     * @return the recipe or <code>null</code>
+     */
     Recipe getRecipe(String name);
 
+    /**
+     * Return the environment object for a given name.
+     *
+     * @param name
+     * @return the environment object or <code>null</code>
+     */
     Object getDefault(String name);
 
-    void putInstance(String name, Object instance);
-
     void putRecipe(String name, Recipe recipe);
 
     void putDefault(String name, Object instance);
 
+    Object create(String name) throws ComponentDefinitionException;
+
+    Map<String,Object> createAll(String... names) throws ComponentDefinitionException;
+
+    Map<String, Object> createAll(Collection<String> names) throws ComponentDefinitionException;
+
+    <T> List<T> getAllRecipes(Class<T> clazz, String... names);
+
+    Set<Recipe> getAllRecipes(String... names);
+
     void destroy();
 
 }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/AbstractPropertyPlaceholder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/AbstractPropertyPlaceholder.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/AbstractPropertyPlaceholder.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/AbstractPropertyPlaceholder.java Wed Jun 17 19:06:04 2009
@@ -236,8 +236,8 @@
             return retrievedValue;
         }
 
-        public String getTypeName() {
-            return metadata.getTypeName();
+        public String getType() {
+            return metadata.getType();
         }
 
     }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java Wed Jun 17 19:06:04 2009
@@ -269,7 +269,7 @@
     private static ValueMetadata createValue(ParserContext context, String value, String type) {
         MutableValueMetadata m = context.createMetadata(MutableValueMetadata.class);
         m.setStringValue(value);
-        m.setTypeName(type);
+        m.setType(type);
         return m;
     }
 
@@ -288,7 +288,7 @@
     private static CollectionMetadata createList(ParserContext context, List<String> list) {
         MutableCollectionMetadata m = context.createMetadata(MutableCollectionMetadata.class);
         m.setCollectionClass(List.class);
-        m.setValueTypeName(String.class.getName());
+        m.setValueType(String.class.getName());
         for (String v : list) {
             m.addValue(createValue(context, v, String.class.getName()));
         }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableCollectionMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableCollectionMetadata.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableCollectionMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableCollectionMetadata.java Wed Jun 17 19:06:04 2009
@@ -31,7 +31,7 @@
 
     void setCollectionClass(Class clazz);
 
-    void setValueTypeName(String valueTypeName);
+    void setValueType(String valueType);
 
     void addValue(Metadata value);
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapMetadata.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableMapMetadata.java Wed Jun 17 19:06:04 2009
@@ -31,9 +31,9 @@
  */
 public interface MutableMapMetadata extends MapMetadata {
 
-    void setKeyTypeName(String keyTypeName);
+    void setKeyType(String keyType);
 
-    void setValueTypeName(String valueTypeName);
+    void setValueType(String valueType);
 
     void addEntry(MapEntry entry);
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceMetadata.java Wed Jun 17 19:06:04 2009
@@ -35,9 +35,9 @@
 
     void setServiceComponent(Target serviceComponent);
 
-    void addInterfaceName(String interfaceName);
+    void addInterface(String interfaceName);
 
-    void removeInterfaceName(String interfaceName);
+    void removeInterface(String interfaceName);
 
     void setAutoExport(int autoExportMode);
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceReferenceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceReferenceMetadata.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceReferenceMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableServiceReferenceMetadata.java Wed Jun 17 19:06:04 2009
@@ -32,7 +32,7 @@
 
     void setAvailability(int availability);
 
-    void setInterfaceName(String interfaceName);
+    void setInterface(String interfaceName);
 
     void setComponentName(String componentName);
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableValueMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableValueMetadata.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableValueMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/mutable/MutableValueMetadata.java Wed Jun 17 19:06:04 2009
@@ -30,6 +30,6 @@
 
     void setStringValue(String stringValue);
 
-    void setTypeName(String typeName);
+    void setType(String type);
 
 }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/CollectionMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/CollectionMetadataImpl.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/CollectionMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/CollectionMetadataImpl.java Wed Jun 17 19:06:04 2009
@@ -35,21 +35,21 @@
 public class CollectionMetadataImpl implements MutableCollectionMetadata {
 
     private Class collectionClass;
-    private String valueTypeName;
+    private String valueType;
     private List<Metadata> values;
 
     public CollectionMetadataImpl() {
     }
 
-    public CollectionMetadataImpl(Class collectionClass, String valueTypeName, List<Metadata> values) {
+    public CollectionMetadataImpl(Class collectionClass, String valueType, List<Metadata> values) {
         this.collectionClass = collectionClass;
-        this.valueTypeName = valueTypeName;
+        this.valueType = valueType;
         this.values = values;
     }
     
     public CollectionMetadataImpl(CollectionMetadata source) {
         this.collectionClass = source.getCollectionClass();
-        this.valueTypeName = source.getValueTypeName();
+        this.valueType = source.getValueType();
         for (Metadata value : source.getValues()) {
             addValue(MetadataUtil.cloneMetadata(value));
         }
@@ -63,12 +63,12 @@
         this.collectionClass = collectionClass;
     }
 
-    public String getValueTypeName() {
-        return valueTypeName;
+    public String getValueType() {
+        return valueType;
     }
 
-    public void setValueTypeName(String valueTypeName) {
-        this.valueTypeName = valueTypeName;
+    public void setValueType(String valueType) {
+        this.valueType = valueType;
     }
 
     public List<Metadata> getValues() {
@@ -100,7 +100,7 @@
     public String toString() {
         return "CollectionMetadata[" +
                 "collectionClass=" + collectionClass +
-                ", valueTypeName='" + valueTypeName + '\'' +
+                ", valueType='" + valueType + '\'' +
                 ", values=" + values +
                 ']';
     }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapMetadataImpl.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MapMetadataImpl.java Wed Jun 17 19:06:04 2009
@@ -36,41 +36,41 @@
  */
 public class MapMetadataImpl implements MutableMapMetadata {
 
-    private String keyTypeName;
-    private String valueTypeName;
+    private String keyType;
+    private String valueType;
     private List<MapEntry> entries;
 
     public MapMetadataImpl() {
     }
 
-    public MapMetadataImpl(String keyTypeName, String valueTypeName, List<MapEntry> entries) {
-        this.keyTypeName = keyTypeName;
-        this.valueTypeName = valueTypeName;
+    public MapMetadataImpl(String keyType, String valueType, List<MapEntry> entries) {
+        this.keyType = keyType;
+        this.valueType = valueType;
         this.entries = entries;
     }
 
     public MapMetadataImpl(MapMetadata source) {
-        this.valueTypeName = source.getValueTypeName();
-        this.keyTypeName = source.getKeyTypeName();
+        this.valueType = source.getValueType();
+        this.keyType = source.getKeyType();
         for (MapEntry entry : source.getEntries()) {
             addEntry(new MapEntryImpl(entry));
         }
     }
 
-    public String getKeyTypeName() {
-        return this.keyTypeName;
+    public String getKeyType() {
+        return this.keyType;
     }
 
-    public void setKeyTypeName(String keyTypeName) {
-        this.keyTypeName = keyTypeName;
+    public void setKeyType(String keyTypeName) {
+        this.keyType = keyTypeName;
     }
 
-    public String getValueTypeName() {
-        return this.valueTypeName;
+    public String getValueType() {
+        return this.valueType;
     }
 
-    public void setValueTypeName(String valueTypeName) {
-        this.valueTypeName = valueTypeName;
+    public void setValueType(String valueTypeName) {
+        this.valueType = valueTypeName;
     }
 
     public List<MapEntry> getEntries() {
@@ -107,8 +107,8 @@
     @Override
     public String toString() {
         return "MapMetadata[" +
-                "keyTypeName='" + keyTypeName + '\'' +
-                ", valueTypeName='" + valueTypeName + '\'' +
+                "keyType='" + keyType + '\'' +
+                ", valueType='" + valueType + '\'' +
                 ", entries=" + entries +
                 ']';
     }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefListMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefListMetadataImpl.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefListMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/RefListMetadataImpl.java Wed Jun 17 19:06:04 2009
@@ -54,10 +54,10 @@
                 ", initialization=" + initialization +
                 ", dependsOn=" + dependsOn +
                 ", availability=" + availability +
-                ", interfaceName='" + interfaceName + '\'' +
+                ", interface='" + interfaceName + '\'' +
                 ", componentName='" + componentName + '\'' +
                 ", filter='" + filter + '\'' +
-                ", serviceListeners=" + referenceListeners +
+                ", referenceListeners=" + referenceListeners +
                 ", memberType=" + memberType +
                 ']';
     }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceMetadataImpl.java?rev=785758&r1=785757&r2=785758&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceMetadataImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ReferenceMetadataImpl.java Wed Jun 17 19:06:04 2009
@@ -54,10 +54,10 @@
                 ", initialization=" + initialization +
                 ", dependsOn=" + dependsOn +
                 ", availability=" + availability +
-                ", interfaceName='" + interfaceName + '\'' +
+                ", interface='" + interfaceName + '\'' +
                 ", componentName='" + componentName + '\'' +
                 ", filter='" + filter + '\'' +
-                ", serviceListeners=" + referenceListeners +
+                ", referenceListeners=" + referenceListeners +
                 ", timeout=" + timeout +
                 ']';
     }



Mime
View raw message