geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r784098 - in /geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint: container/ di/
Date Fri, 12 Jun 2009 12:35:51 GMT
Author: gnodet
Date: Fri Jun 12 12:35:50 2009
New Revision: 784098

URL: http://svn.apache.org/viewvc?rev=784098&view=rev
Log:
Refactor a bit the Recipe interface to make it cleaner

Removed:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Destroyable.java
Modified:
    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/BlueprintObjectInstantiator.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/ArrayRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/CollectionRecipe.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
    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/MapRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Recipe.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/ValueRecipe.java

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=784098&r1=784097&r2=784098&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
Fri Jun 12 12:35:50 2009
@@ -151,9 +151,8 @@
         return satisfied.get();
     }
 
-    @Override
-    public List<Recipe> getNestedRecipes() {
-        List<Recipe> recipes = super.getNestedRecipes();
+    public List<Recipe> getDependencies() {
+        List<Recipe> recipes = new ArrayList<Recipe>();
         if (listenersRecipe != null) {
             recipes.add(listenersRecipe);
         }
@@ -279,10 +278,6 @@
         }
     }
 
-    @Override
-    public void postCreate() {
-    }
-
     protected abstract void track(ServiceReference reference);
 
     protected abstract void untrack(ServiceReference reference);

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=784098&r1=784097&r2=784098&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
Fri Jun 12 12:35:50 2009
@@ -33,7 +33,6 @@
 import org.apache.geronimo.blueprint.BeanProcessor;
 import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
 import org.apache.geronimo.blueprint.di.AbstractRecipe;
-import org.apache.geronimo.blueprint.di.Destroyable;
 import org.apache.geronimo.blueprint.di.Recipe;
 import org.apache.geronimo.blueprint.utils.ReflectionUtils;
 import static org.apache.geronimo.blueprint.utils.ReflectionUtils.getRealCause;
@@ -129,8 +128,7 @@
         this.explicitDependencies = explicitDependencies;
     }
 
-    @Override
-    public List<Recipe> getNestedRecipes() {
+    public List<Recipe> getDependencies() {
         List<Recipe> recipes = new ArrayList<Recipe>();
         for (Object o : properties.values()) {
             if (o instanceof Recipe) {
@@ -538,12 +536,14 @@
     }
 
     @Override
-    public Destroyable getDestroyable(Object instance) {
+    public void destroy(Object instance) {
         Method method = getDestroyMethod(instance);
         if (method != null) {
-            return new DestroyCallback(method, instance);
-        } else {
-            return null;
+            try {
+                method.invoke(instance);
+            } catch (Throwable e) {
+                LOGGER.info("Error destroying bean " + getName(), getRealCause(e));
+            }
         }
     }
 
@@ -707,23 +707,4 @@
 
     }
 
-    private class DestroyCallback implements Destroyable {
-
-        private Method method;
-        private Object instance;
-
-        public DestroyCallback(Method method, Object instance) {
-            this.method = method;
-            this.instance = instance;
-        }
-
-        public void destroy() {
-            try {
-                method.invoke(instance);
-            } catch (Exception e) {
-                LOGGER.info("Error destroying bean " + getName(), getRealCause(e));
-            }
-        }
-
-    }
 }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectInstantiator.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectInstantiator.java?rev=784098&r1=784097&r2=784098&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectInstantiator.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectInstantiator.java
Fri Jun 12 12:35:50 2009
@@ -81,18 +81,6 @@
                     throw new ComponentDefinitionException("Unable to convert instance "
+ name, e);
                 }
                 instances.put(name, obj);
-                Set<Recipe> processed = new HashSet<Recipe>();
-                boolean modified;
-                do {
-                    modified = false;
-                    List<Recipe> recipes = new ArrayList<Recipe>(ExecutionContext.getContext().getCreatedRecipes());
-                    for (Recipe recipe : recipes) {
-                        if (processed.add(recipe)) {
-                            recipe.postCreate();
-                            modified = true;
-                        }
-                    }
-                } while (modified);
             } finally {
                 ExecutionContext.setContext(oldContext);
             }
@@ -132,7 +120,7 @@
     private void internalGetAllRecipes(Set<Recipe> recipes, Recipe r) {
         if (r != null) {
             if (recipes.add(r)) {
-                for (Recipe c : r.getNestedRecipes()) {
+                for (Recipe c : r.getDependencies()) {
                     internalGetAllRecipes(recipes, c);
                 }
             }

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=784098&r1=784097&r2=784098&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
Fri Jun 12 12:35:50 2009
@@ -93,8 +93,7 @@
         this.prototypeService = isPrototypeService(metadata.getServiceComponent());
     }
 
-    @Override
-    public List<Recipe> getNestedRecipes() {
+    public List<Recipe> getDependencies() {
         List<Recipe> recipes = new ArrayList<Recipe>();
         if (serviceRecipe != null) {
             recipes.add(serviceRecipe);

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=784098&r1=784097&r2=784098&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
Fri Jun 12 12:35:50 2009
@@ -73,9 +73,6 @@
 
     protected abstract Object internalCreate() throws ComponentDefinitionException;
 
-    public void postCreate() {
-    }
-
     protected void addObject(Object obj, boolean partial) {
         if (prototype) {
             return;
@@ -83,10 +80,6 @@
         ExecutionContext.getContext().addObject(name, obj, partial);
     }
     
-    public List<Recipe> getNestedRecipes() {
-        return new ArrayList<Recipe>();
-    }
-
     protected Object convert(Object obj, Type type) throws Exception {
         return ExecutionContext.getContext().convert(obj, type);
     }
@@ -99,8 +92,7 @@
         }
     }
 
-    public Destroyable getDestroyable(Object instance) {
-        return null;
+    public void destroy(Object instance) {
     }
 
     public String toString() {

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ArrayRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ArrayRecipe.java?rev=784098&r1=784097&r2=784098&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ArrayRecipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ArrayRecipe.java
Fri Jun 12 12:35:50 2009
@@ -36,7 +36,7 @@
         this.list = new ArrayList<Recipe>();
     }
 
-    public List<Recipe> getNestedRecipes() {
+    public List<Recipe> getDependencies() {
         List<Recipe> nestedRecipes = new ArrayList<Recipe>(list.size());
         for (Recipe recipe : list) {
             if (recipe != null) {

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/CollectionRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/CollectionRecipe.java?rev=784098&r1=784097&r2=784098&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/CollectionRecipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/CollectionRecipe.java
Fri Jun 12 12:35:50 2009
@@ -39,7 +39,7 @@
         this.list = new ArrayList<Recipe>();
     }
 
-    public List<Recipe> getNestedRecipes() {
+    public List<Recipe> getDependencies() {
         List<Recipe> nestedRecipes = new ArrayList<Recipe>(list.size());
         for (Recipe recipe : list) {
             if (recipe != null) {

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/DefaultExecutionContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/DefaultExecutionContext.java?rev=784098&r1=784097&r2=784098&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/DefaultExecutionContext.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/DefaultExecutionContext.java
Fri Jun 12 12:35:50 2009
@@ -41,8 +41,6 @@
      */
     private Map<String, Object> partialObjects = new HashMap<String, Object>();
 
-    private List<Recipe> createdRecipes = new ArrayList<Recipe>();
-    
     /**
      * Before each recipe is executed it is pushed on the stack.  The
      * stack is used to detect circular dependencies and so a recipe can
@@ -80,7 +78,6 @@
             throw new CircularDependencyException(circularity);
         }
         stack.add(recipe);
-        createdRecipes.add(recipe);
     }
 
     public Recipe pop() {
@@ -125,10 +122,6 @@
         return obj;
     }
 
-    public List<Recipe> getCreatedRecipes() {
-        return createdRecipes;
-    }
-
     public Recipe getRecipe(String name) {
         return repository.getRecipe(name);
     }

Modified: 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/di/DefaultRepository.java?rev=784098&r1=784097&r2=784098&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/di/DefaultRepository.java
Fri Jun 12 12:35:50 2009
@@ -24,6 +24,9 @@
 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 org.osgi.service.blueprint.container.ComponentDefinitionException;
 import org.slf4j.Logger;
@@ -39,20 +42,17 @@
     private Map<String, Object> defaults;
     private Map<String, Recipe> recipes;
     private Map<String, Object> instances;
-    private List<Destroyable> destroyList;
 
     public DefaultRepository() {
-        recipes = new TreeMap<String, Recipe>();
-        defaults = new TreeMap<String, Object>();
-        instances = new TreeMap<String, Object>();
-        destroyList = new ArrayList<Destroyable>();
+        recipes = new HashMap<String, Recipe>();
+        defaults = new HashMap<String, Object>();
+        instances = new LinkedHashMap<String, Object>();
     }
     
     public DefaultRepository(DefaultRepository source) {
-        recipes = new TreeMap<String, Recipe>(source.recipes);
-        defaults = new TreeMap<String, Object>();
-        instances = new TreeMap<String, Object>(source.instances);
-        destroyList = new ArrayList<Destroyable>();
+        recipes = new HashMap<String, Recipe>(source.recipes);
+        defaults = new HashMap<String, Object>();
+        instances = new LinkedHashMap<String, Object>(source.instances);
     }
 
     public void set(String name, Object instance) {
@@ -106,28 +106,19 @@
         if (instances.get(name) != null) {
             throw new ComponentDefinitionException("Name " + name + " is already registered
to instance " + instances.get(name));
         }
-        Recipe recipe = recipes.get(name);
-        if (recipe != null) {
-            Destroyable destroy = recipe.getDestroyable(instance);
-            if (destroy != null) {
-                destroyList.add(destroy);
-            }
-        }
         instances.put(name, instance);
     }
 
     public void destroy() {
         // destroy objects in reverse creation order
-        ListIterator<Destroyable> reverse = destroyList.listIterator(destroyList.size());
-        while (reverse.hasPrevious()) {
-            Destroyable d = reverse.previous();
-            try {
-                d.destroy();
-            } catch (Exception e) {
-                LOGGER.info("Error destroying bean " + d, e);
+        List<Map.Entry<String, Object>> entries = new ArrayList<Map.Entry<String,
Object>>(instances.entrySet());
+        Collections.reverse(entries);
+        for (Map.Entry<String, Object> entry : entries) {
+            Recipe recipe = recipes.get(entry.getKey());
+            if (recipe != null) {
+                recipe.destroy(entry.getValue());
             }
         }
-        destroyList.clear();
         instances.clear();
     }
     

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=784098&r1=784097&r2=784098&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
Fri Jun 12 12:35:50 2009
@@ -87,8 +87,6 @@
     
     public abstract Object getPartialObject(String name);
 
-    public abstract List<Recipe> getCreatedRecipes();
-
     public abstract Object convert(Object value, Type type) throws Exception;
 
     public abstract Class loadClass(String className) throws ClassNotFoundException;

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=784098&r1=784097&r2=784098&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
Fri Jun 12 12:35:50 2009
@@ -41,7 +41,7 @@
         return idRef;
     }
 
-    public List<Recipe> getNestedRecipes() {
+    public List<Recipe> getDependencies() {
         Recipe recipe = ExecutionContext.getContext().getRecipe(idRef);
         if (recipe != null) {
             return Collections.singletonList(recipe);

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/MapRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/MapRecipe.java?rev=784098&r1=784097&r2=784098&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/MapRecipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/MapRecipe.java
Fri Jun 12 12:35:50 2009
@@ -42,7 +42,7 @@
         this.entries = new ArrayList<Recipe[]>();
     }
 
-    public List<Recipe> getNestedRecipes() {
+    public List<Recipe> getDependencies() {
         List<Recipe> nestedRecipes = new ArrayList<Recipe>(entries.size() * 2);
         for (Recipe[] entry : entries) {
             nestedRecipes.add(entry[0]);
@@ -99,7 +99,7 @@
         }
     }
 
-   public static class DummyDictionaryAsMap extends AbstractMap {
+    public static class DummyDictionaryAsMap extends AbstractMap {
 
         private final Dictionary dictionary;
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Recipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Recipe.java?rev=784098&r1=784097&r2=784098&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Recipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Recipe.java
Fri Jun 12 12:35:50 2009
@@ -21,20 +21,39 @@
 import org.osgi.service.blueprint.container.ComponentDefinitionException;
 
 /**
+ * The <code>Recipe</code> interface abstracts the creation of objects
+ *
  * @version $Rev: 6680 $ $Date: 2005-12-24T04:38:27.427468Z $
  */
 public interface Recipe {
 
+    /**
+     * Get the unique name for this recipe.
+     *
+     * @return the unique name for this recipe.
+     */
     String getName();
 
+    /**
+     * Get the list of nested recipes, i.e. its dependencies.
+     *
+     * @return a list of dependencies
+     */
+    List<Recipe> getDependencies();
+
+    /**
+     * Create an instance for this recipe.
+     *
+     * @return a new instance for this recipe
+     * @throws ComponentDefinitionException
+     */
     Object create() throws ComponentDefinitionException;
 
-    List<Recipe> getNestedRecipes();
-
-    // TODO: replace with destroy(Object instance)
-    Destroyable getDestroyable(Object instance);
-
-    // TODO: Remove this method
-    void postCreate();
+    /**
+     * Destroy an instance created by this recipe
+     *
+     * @param instance the instance to be destroyed
+     */
+    void destroy(Object instance);
 
 }

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=784098&r1=784097&r2=784098&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
Fri Jun 12 12:35:50 2009
@@ -40,7 +40,7 @@
         this.idRef = name;
     }
 
-    public List<Recipe> getNestedRecipes() {
+    public List<Recipe> getDependencies() {
         Recipe recipe = ExecutionContext.getContext().getRecipe(idRef);
         if (recipe != null) {
             return Collections.singletonList(recipe);

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ValueRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ValueRecipe.java?rev=784098&r1=784097&r2=784098&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ValueRecipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ValueRecipe.java
Fri Jun 12 12:35:50 2009
@@ -19,6 +19,8 @@
 package org.apache.geronimo.blueprint.di;
 
 import java.lang.reflect.Type;
+import java.util.List;
+import java.util.Collections;
 
 import org.osgi.service.blueprint.container.ComponentDefinitionException;
 import org.osgi.service.blueprint.reflect.ValueMetadata;
@@ -42,6 +44,10 @@
         this.type = type;
     }
 
+    public List<Recipe> getDependencies() {
+        return Collections.emptyList();
+    }
+
     @Override
     protected Object internalCreate() throws ComponentDefinitionException {
         try {



Mime
View raw message