felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r1455539 - in /felix/trunk/ipojo: api/ runtime/api/ runtime/api/pom.xml runtime/api/src/main/java/org/apache/felix/ipojo/api/PrimitiveComponentType.java
Date Tue, 12 Mar 2013 14:19:59 GMT
Author: clement
Date: Tue Mar 12 14:19:58 2013
New Revision: 1455539

URL: http://svn.apache.org/r1455539
Log:
FELIX-3903 - Move API to runtime

Added:
    felix/trunk/ipojo/runtime/api/
      - copied from r1455454, felix/trunk/ipojo/api/
Removed:
    felix/trunk/ipojo/api/
Modified:
    felix/trunk/ipojo/runtime/api/pom.xml
    felix/trunk/ipojo/runtime/api/src/main/java/org/apache/felix/ipojo/api/PrimitiveComponentType.java

Modified: felix/trunk/ipojo/runtime/api/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/api/pom.xml?rev=1455539&r1=1455454&r2=1455539&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/api/pom.xml (original)
+++ felix/trunk/ipojo/runtime/api/pom.xml Tue Mar 12 14:19:58 2013
@@ -27,11 +27,11 @@
     <modelVersion>4.0.0</modelVersion>
     <packaging>bundle</packaging>
     <artifactId>org.apache.felix.ipojo.api</artifactId>
-    <version>1.7.0-SNAPSHOT</version>
+    <version>1.9.0-SNAPSHOT</version>
     <name>Apache Felix iPOJO API</name>
 
     <description>
-        iPOJO API used to define component types and instances in Java.
+        iPOJO API used to define component types and instances using Java.
     </description>
     <url>http://felix.apache.org/site/apache-felix-ipojo-api.html</url>
 
@@ -113,7 +113,7 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.ipojo</artifactId>
-            <version>1.8.0</version>
+            <version>1.9.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>
@@ -123,7 +123,7 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.ipojo.manipulator</artifactId>
-            <version>1.8.0</version>
+            <version>1.8.6</version>
         </dependency>
         <dependency>
             <groupId>asm</groupId>

Modified: felix/trunk/ipojo/runtime/api/src/main/java/org/apache/felix/ipojo/api/PrimitiveComponentType.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/api/src/main/java/org/apache/felix/ipojo/api/PrimitiveComponentType.java?rev=1455539&r1=1455454&r2=1455539&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/api/src/main/java/org/apache/felix/ipojo/api/PrimitiveComponentType.java
(original)
+++ felix/trunk/ipojo/runtime/api/src/main/java/org/apache/felix/ipojo/api/PrimitiveComponentType.java
Tue Mar 12 14:19:58 2013
@@ -140,6 +140,13 @@ public class PrimitiveComponentType exte
      */
     private List m_handlers = new ArrayList();
 
+
+    /**
+     * During the manipulation, we detect is the class is already manipulated.
+     * If set to <code>false</code>, the factory is configured to use the factory
classloader.
+     */
+    private boolean m_alreadyManipulated = false;
+
     /**
      * Checks that the component type is not already
      * started.
@@ -433,10 +440,11 @@ public class PrimitiveComponentType exte
         Element meta = m_metadata;
         meta.addElement(m_manipulation);
         try {
-            if (clazz.length == 0) { // Already manipulated
+            if (m_alreadyManipulated) { // Already manipulated
                 m_factory = new ComponentFactory(m_context, meta);
             } else {
                 m_factory = new ComponentFactory(m_context, clazz, meta);
+                m_factory.setUseFactoryClassloader(true);
             }
             m_factory.start();
         } catch (ConfigurationException e) {
@@ -455,6 +463,7 @@ public class PrimitiveComponentType exte
             byte[] array = getClassByteArray();
             byte[] newclazz = manipulator.manipulate(array);
             m_manipulation = manipulator.getManipulationMetadata();
+            m_alreadyManipulated = newclazz.length == array.length;
             return newclazz;
         } catch (IOException e) {
             throw new IllegalStateException("An exception occurs during implementation class
manipulation : " + e.getMessage());



Mime
View raw message