geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r780889 - /geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java
Date Mon, 01 Jun 2009 23:51:46 GMT
Author: gnodet
Date: Mon Jun  1 23:51:46 2009
New Revision: 780889

URL: http://svn.apache.org/viewvc?rev=780889&view=rev
Log:
When the class is given using the runtimeClass on the metadata, we need to use the types using
this class's classLoader instead of the blueprint bundle

Modified:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java

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=780889&r1=780888&r2=780889&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
Mon Jun  1 23:51:46 2009
@@ -159,6 +159,19 @@
         }
     }
 
+    @Override
+    protected Class loadClass(String className) {
+        if (type instanceof Class) {
+            try {
+                return ((Class) type).getClassLoader().loadClass(className);
+            } catch (ClassNotFoundException e) {
+                throw new ComponentDefinitionException("Unable to load class " + className
+ " from recipe " + this, e);
+            }
+        } else {
+            return super.loadClass(className);
+        }
+    }
+
     private Object getInstance() throws ComponentDefinitionException {
         Object instance;
         



Mime
View raw message