aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r1057359 [2/6] - in /aries/sandbox/jbohn/interceptor-proto: ./ application/ application/application-api/ application/application-api/src/main/java/org/apache/aries/application/management/spi/framework/ application/application-bundle/ applic...
Date Mon, 10 Jan 2011 21:03:26 GMT
Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itest-interface/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itest-interface/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itest-interface/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itest-interface/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.aries.application</groupId>
         <artifactId>application</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>org.apache.aries.application.runtime.itest.interfaces</artifactId>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.aries.application</groupId>
         <artifactId>application</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>twitter</artifactId>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-bundle/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.aries.application.itest.twitter</groupId>
         <artifactId>twitter</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
 
 	<artifactId>org.apache.aries.application.itest.twitter.bundle</artifactId>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-eba/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-eba/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-eba/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itest-twitter/twitter-eba/pom.xml Mon Jan 10 21:03:14 2011
@@ -26,7 +26,7 @@ under the License.
     <parent>
         <groupId>org.apache.aries.application.itest.twitter</groupId>
         <artifactId>twitter</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>org.apache.aries.application.itest.twitter.eba</artifactId>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itests/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itests/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itests/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>application</artifactId>
         <groupId>org.apache.aries.application</groupId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
     
     <modelVersion>4.0.0</modelVersion>
@@ -55,6 +55,16 @@
 			<scope>test</scope>
 		</dependency>
 		<dependency>
+			<groupId>org.apache.aries.proxy</groupId>
+			<artifactId>org.apache.aries.proxy</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>asm</groupId>
+			<artifactId>asm-all</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
 			<groupId>org.ops4j.pax.logging</groupId>
 			<artifactId>pax-logging-api</artifactId>
 			<scope>test</scope>
@@ -115,7 +125,7 @@
         <dependency>
             <groupId>org.apache.aries.application.itest.twitter</groupId>
             <artifactId>org.apache.aries.application.itest.twitter.eba</artifactId>
-            <version>${version}</version>
+            <version>${project.version}</version>
             <type>eba</type>
             <scope>test</scope>
         </dependency>
@@ -192,7 +202,7 @@
         <dependency>
         	<groupId>org.apache.aries.transaction</groupId>
         	<artifactId>org.apache.aries.transaction.blueprint</artifactId>
-        	<version>0.3-incubating-SNAPSHOT</version>
+        	<version>0.3-SNAPSHOT</version>
         	<type>bundle</type>
         	<scope>test</scope>
         </dependency>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java Mon Jan 10 21:03:14 2011
@@ -145,6 +145,8 @@ public class BasicAppManagerTest extends
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.itest.interfaces"),
         mavenBundle("org.apache.aries", "org.apache.aries.util"),
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"), 
+        mavenBundle("asm", "asm-all"),
+        mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
         mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
         

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java Mon Jan 10 21:03:14 2011
@@ -144,6 +144,8 @@ public class BasicNoOpResolverTest exten
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.itest.interfaces"),
         mavenBundle("org.apache.aries", "org.apache.aries.util"),
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"), 
+        mavenBundle("asm", "asm-all"),
+        mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
         mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
         

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java Mon Jan 10 21:03:14 2011
@@ -244,6 +244,8 @@ public class IsolatedRuntimeTest extends
         systemProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP).value("true"),
         // Bundles
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
+        mavenBundle("asm", "asm-all"),
+        mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.blueprint"),
         mavenBundle("org.apache.aries", "org.apache.aries.util"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.api"),

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java Mon Jan 10 21:03:14 2011
@@ -195,6 +195,8 @@ public class MinimumImportsTest extends 
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.modeller"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.deployment.management"),
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"), 
+        mavenBundle("asm", "asm-all"),
+        mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
         mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
 

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java Mon Jan 10 21:03:14 2011
@@ -164,6 +164,8 @@ public class OBRAppManagerTest extends A
 
         // Bundles
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
+        mavenBundle("asm", "asm-all"),
+        mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.apache.aries", "org.apache.aries.util"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.api"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.utils"),

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java Mon Jan 10 21:03:14 2011
@@ -540,6 +540,8 @@ public class OBRResolverAdvancedTest ext
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.itest.interfaces"),
         mavenBundle("org.apache.aries", "org.apache.aries.util"),
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
+        mavenBundle("asm", "asm-all"),
+        mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
         mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
         /* For debugging, uncomment the next two lines  */

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java Mon Jan 10 21:03:14 2011
@@ -281,6 +281,8 @@ public class OBRResolverTest extends Abs
 
         // Bundles
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
+        mavenBundle("asm", "asm-all"),
+        mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.apache.aries", "org.apache.aries.util"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.api"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.utils"),

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java Mon Jan 10 21:03:14 2011
@@ -260,6 +260,8 @@ public class UpdateAppTest extends Abstr
         // Bundles
         
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
+        mavenBundle("asm", "asm-all"),
+        mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
         mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.blueprint"),
         mavenBundle("org.apache.aries", "org.apache.aries.util"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.api"),

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-management/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-management/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-management/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-management/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.aries.application</groupId>
         <artifactId>application</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>org.apache.aries.application.management</artifactId>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-modeller/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-modeller/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-modeller/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-modeller/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.aries.application</groupId>
         <artifactId>application</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>org.apache.aries.application.modeller</artifactId>
@@ -61,7 +61,7 @@
         <dependency>
             <groupId>org.apache.aries.jndi</groupId>
             <artifactId>org.apache.aries.jndi.api</artifactId>
-            <version>0.3-incubating-SNAPSHOT</version>
+            <version>0.3-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -93,12 +93,12 @@
         <dependency>
         	<groupId>org.apache.aries.blueprint</groupId>
         	<artifactId>org.apache.aries.blueprint.api</artifactId>
-        	<version>0.3-incubating-SNAPSHOT</version> 
+        	<version>0.3-SNAPSHOT</version> 
         </dependency>
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
             <artifactId>org.apache.aries.blueprint.core</artifactId>
-            <version>0.3-incubating-SNAPSHOT</version> 
+            <version>0.3-SNAPSHOT</version> 
         </dependency>
     </dependencies>
 

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ModelledResourceManagerImpl.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ModelledResourceManagerImpl.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ModelledResourceManagerImpl.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ModelledResourceManagerImpl.java Mon Jan 10 21:03:14 2011
@@ -30,14 +30,11 @@ import java.net.URL;
 import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 import java.util.jar.Attributes;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
 
 import org.apache.aries.application.InvalidAttributeException;
 import org.apache.aries.application.filesystem.IDirectory;
@@ -155,7 +152,7 @@ public class ModelledResourceManagerImpl
    * @throws OpenFailureException
    */
   private Collection<IFile> findBlueprints (IDirectory oneBundle) 
-  throws  IOException
+  throws  IOException, URISyntaxException
   {
     _logger.debug(LOG_ENTRY, "findBlueprints", oneBundle);
     Set<IDirectory> archiveSet = new HashSet<IDirectory>();
@@ -176,14 +173,13 @@ public class ModelledResourceManagerImpl
    * @throws OpenFailureException
    */
   private Collection<IFile> findBlueprints(Collection<IDirectory> applicationBundles)
-  throws IOException
+  throws IOException, URISyntaxException
   {
     _logger.debug(LOG_ENTRY, "findBlueprints", applicationBundles);
     Collection<IFile> blueprints = new ArrayList<IFile>();
     for (IDirectory appBundle : applicationBundles) {
       if (appBundle != null) {
-        File bundleFile = new File(appBundle.toString());
-        BundleManifest bundleMf = BundleManifest.fromBundle(bundleFile);
+        BundleManifest bundleMf = BundleManifest.fromBundle(appBundle);
         BundleBlueprintParser bpParser = new BundleBlueprintParser(bundleMf);
         List<IFile> files = appBundle.listAllFiles();
         Iterator<IFile> it = files.iterator();

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-noop-platform-repository/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-noop-platform-repository/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-noop-platform-repository/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-noop-platform-repository/pom.xml Mon Jan 10 21:03:14 2011
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>application</artifactId>
         <groupId>org.apache.aries.application</groupId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
     <artifactId>org.apache.aries.application.noop.platform.repo</artifactId>
     <packaging>bundle</packaging>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-noop-postresolve-process/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-noop-postresolve-process/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-noop-postresolve-process/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-noop-postresolve-process/pom.xml Mon Jan 10 21:03:14 2011
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>application</artifactId>
         <groupId>org.apache.aries.application</groupId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
     <artifactId>org.apache.aries.application.noop.postresolve.process</artifactId>
     <packaging>bundle</packaging>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-noop-resolver/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-noop-resolver/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-noop-resolver/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-noop-resolver/pom.xml Mon Jan 10 21:03:14 2011
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>application</artifactId>
         <groupId>org.apache.aries.application</groupId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
     <artifactId>org.apache.aries.application.resolver.noop</artifactId>
     <packaging>bundle</packaging>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-obr-resolver/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-obr-resolver/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-obr-resolver/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-obr-resolver/pom.xml Mon Jan 10 21:03:14 2011
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>application</artifactId>
         <groupId>org.apache.aries.application</groupId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
     <artifactId>org.apache.aries.application.resolver.obr</artifactId>
     <packaging>bundle</packaging>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework-management/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework-management/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework-management/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework-management/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>application</artifactId>
         <groupId>org.apache.aries.application</groupId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
     
     <modelVersion>4.0.0</modelVersion>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java Mon Jan 10 21:03:14 2011
@@ -27,6 +27,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -58,7 +59,7 @@ public class BundleFrameworkManagerImpl 
   BundleFrameworkFactory _bundleFrameworkFactory;
   BundleFrameworkConfigurationFactory _bundleFrameworkConfigurationFactory;
   Map<Bundle, BundleFramework> _frameworks = new HashMap<Bundle, BundleFramework>();
-  Map<AriesApplication, BundleFramework> _frameworksByApp = new HashMap<AriesApplication, BundleFramework>();
+  Map<String, BundleFramework> _frameworksByAppScope = new HashMap<String, BundleFramework>();
   private List<UpdateStrategy> _updateStrategies = Collections.emptyList();
 
   public void setUpdateStrategies(List<UpdateStrategy> updateStrategies)
@@ -116,7 +117,7 @@ public class BundleFrameworkManagerImpl 
           .getIsolatedBundleContext(), app);
 
       _frameworks.put(isolatedFramework.getFrameworkBundle(), isolatedFramework);
-      _frameworksByApp.put(app, isolatedFramework);
+      _frameworksByAppScope.put(app.getApplicationMetadata().getApplicationScope(), isolatedFramework);
 
       frameworkBundle = isolatedFramework.getFrameworkBundle();
     }
@@ -162,7 +163,7 @@ public class BundleFrameworkManagerImpl 
       boolean frameworkStarted = false;
       try {
         // Start the empty framework bundle
-        bundleFramework.init();
+        bundleFramework.start();
         frameworkStarted = true;
       } catch (BundleException e) {
         // This may fail if the framework bundle has exports but we will retry later
@@ -172,16 +173,24 @@ public class BundleFrameworkManagerImpl 
        * Install the bundles into the new framework
        */
       
-      List<Bundle> installedBundles = new ArrayList<Bundle>();
-      BundleContext frameworkBundleContext = bundleFramework.getIsolatedBundleContext();
-      if (frameworkBundleContext != null) {
-        for (BundleSuggestion suggestion : bundlesToBeInstalled)
-          installedBundles.add(bundleFramework.install(suggestion, app));
+      try {
+        List<Bundle> installedBundles = new ArrayList<Bundle>();
+        BundleContext frameworkBundleContext = bundleFramework.getIsolatedBundleContext();
+        if (frameworkBundleContext != null) {
+          for (BundleSuggestion suggestion : bundlesToBeInstalled)
+            installedBundles.add(bundleFramework.install(suggestion, app));
+        }
+        
+        // Finally, start the whole lot
+        if (!frameworkStarted)
+          bundleFramework.start();
+      } catch (BundleException be) {
+        bundleFramework.close();
+        throw be;
+      } catch (RuntimeException re) {
+        bundleFramework.close();
+        throw re;
       }
-      
-      // Finally, start the whole lot
-      if (!frameworkStarted)
-        bundleFramework.init();
     }
 
     LOGGER.debug(LOG_EXIT, "isolatedInstall", bundleFramework);
@@ -200,7 +209,16 @@ public class BundleFrameworkManagerImpl 
   {
     synchronized (BundleFrameworkManager.SHARED_FRAMEWORK_LOCK) {
       BundleFramework framework = getBundleFramework(b);
-      if (framework != null) framework.close();
+      if (framework != null) {
+        framework.close();
+        
+        // clean up our maps so we don't leak memory
+        _frameworks.remove(b);
+        Iterator<BundleFramework> it = _frameworksByAppScope.values().iterator();
+        while (it.hasNext()) {
+          if (it.next().equals(framework)) it.remove();
+        }
+      }
     }
   }
 
@@ -260,7 +278,7 @@ public class BundleFrameworkManagerImpl 
           "No UpdateStrategy supports the supplied DeploymentMetadata changes.");
 
     synchronized (BundleFrameworkManager.SHARED_FRAMEWORK_LOCK) {
-      final BundleFramework appFwk = _frameworksByApp.get(app);
+      final BundleFramework appFwk = _frameworksByAppScope.get(app.getApplicationMetadata().getApplicationScope());
 
       strategy.update(new UpdateStrategy.UpdateInfo() {
 
@@ -314,3 +332,4 @@ public class BundleFrameworkManagerImpl 
   }
 
 }
+

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/SharedBundleFramework.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/SharedBundleFramework.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/SharedBundleFramework.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/SharedBundleFramework.java Mon Jan 10 21:03:14 2011
@@ -75,7 +75,7 @@ public class SharedBundleFramework
       
       sharedFramework = bundleFrameworkFactory.createBundleFramework(bc, config);
 
-      sharedFramework.init();
+      sharedFramework.start();
 
     } catch (BundleException e) {
       LOGGER.debug(LOG_EXIT, "createSharedBundleFramework", e);

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>application</artifactId>
         <groupId>org.apache.aries.application</groupId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
     
     <modelVersion>4.0.0</modelVersion>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework/src/main/java/org/apache/aries/application/runtime/framework/BundleFrameworkImpl.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework/src/main/java/org/apache/aries/application/runtime/framework/BundleFrameworkImpl.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework/src/main/java/org/apache/aries/application/runtime/framework/BundleFrameworkImpl.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-runtime-framework/src/main/java/org/apache/aries/application/runtime/framework/BundleFrameworkImpl.java Mon Jan 10 21:03:14 2011
@@ -53,11 +53,25 @@ public class BundleFrameworkImpl impleme
     _bundles = new ArrayList<Bundle>();
   }
 
+  @Override
+  public void start() throws BundleException
+  {
+        _compositeBundle.start(Bundle.START_ACTIVATION_POLICY);
+  if ( _packageAdminTracker == null)
+  {
+      _packageAdminTracker = new ServiceTracker(_compositeBundle.getCompositeFramework().getBundleContext(),
+          PackageAdmin.class.getName(), null);
+      _packageAdminTracker.open();
+  }
+    
+  }
+  
+  @Override
   public void init() throws BundleException
   {
     if (_compositeBundle.getCompositeFramework().getState() != Framework.ACTIVE)
     {
-      _compositeBundle.start(Bundle.START_ACTIVATION_POLICY);
+      _compositeBundle.getCompositeFramework().start();
   
       _packageAdminTracker = new ServiceTracker(_compositeBundle.getCompositeFramework().getBundleContext(),
           PackageAdmin.class.getName(), null);
@@ -151,3 +165,4 @@ public class BundleFrameworkImpl impleme
     _bundles.remove(b);
   }
 }
+

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-runtime-isolated/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-runtime-isolated/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-runtime-isolated/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-runtime-isolated/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>application</artifactId>
         <groupId>org.apache.aries.application</groupId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
     
     <modelVersion>4.0.0</modelVersion>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-runtime-isolated/src/main/java/org/apache/aries/application/runtime/isolated/impl/ApplicationContextImpl.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-runtime-isolated/src/main/java/org/apache/aries/application/runtime/isolated/impl/ApplicationContextImpl.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-runtime-isolated/src/main/java/org/apache/aries/application/runtime/isolated/impl/ApplicationContextImpl.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-runtime-isolated/src/main/java/org/apache/aries/application/runtime/isolated/impl/ApplicationContextImpl.java Mon Jan 10 21:03:14 2011
@@ -23,6 +23,10 @@ import static org.apache.aries.applicati
 import static org.apache.aries.application.utils.AppConstants.LOG_EXCEPTION;
 import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -31,10 +35,12 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.aries.application.ApplicationMetadata;
 import org.apache.aries.application.DeploymentContent;
 import org.apache.aries.application.DeploymentMetadata;
 import org.apache.aries.application.management.AriesApplication;
 import org.apache.aries.application.management.AriesApplicationContext;
+import org.apache.aries.application.management.BundleInfo;
 import org.apache.aries.application.management.UpdateException;
 import org.apache.aries.application.management.spi.framework.BundleFrameworkManager;
 import org.apache.aries.application.management.spi.repository.BundleRepositoryManager;
@@ -49,11 +55,11 @@ public class ApplicationContextImpl impl
 {
   private static final Logger LOGGER = LoggerFactory.getLogger(ApplicationContextImpl.class);
 
-  private AriesApplication _application;
-  private Set<Bundle> _bundles;
+  private final AriesApplication _application;
+  private final Set<Bundle> _bundles;
   private ApplicationState _state = ApplicationState.UNINSTALLED;
-  private BundleRepositoryManager _bundleRepositoryManager;
-  private BundleFrameworkManager _bundleFrameworkManager;
+  private final BundleRepositoryManager _bundleRepositoryManager;
+  private final BundleFrameworkManager _bundleFrameworkManager;
 
   /** deployment metadata associated with aries application */
   private DeploymentMetadata _deploymentMF;
@@ -202,9 +208,9 @@ public class ApplicationContextImpl impl
        */
       try {
         if (shared) _bundles.addAll(_bundleFrameworkManager.installSharedBundles(
-            new ArrayList<BundleSuggestion>(bundlesToBeInstalled.values()), _application));
+            new ArrayList<BundleSuggestion>(bundlesToBeInstalled.values()), makeAppProxy()));
         else _bundles.add(_bundleFrameworkManager.installIsolatedBundles(
-            new ArrayList<BundleSuggestion>(bundlesToBeInstalled.values()), _application));
+            new ArrayList<BundleSuggestion>(bundlesToBeInstalled.values()), makeAppProxy()));
 
       } catch (BundleException e) {
         LOGGER.debug(LOG_EXCEPTION, e);
@@ -212,7 +218,38 @@ public class ApplicationContextImpl impl
       }
     }
     LOGGER.debug(LOG_EXIT, "install");
-
+  }
+  
+  /**
+   * Create a proxy for the AriesApplication we pass on so as to respect the correct current deployment metadata.
+   */
+  private AriesApplication makeAppProxy() {
+    return new AriesApplication() {
+      
+      public void store(OutputStream out) throws FileNotFoundException, IOException {
+        throw new UnsupportedOperationException();
+      }
+      
+      public void store(File f) throws FileNotFoundException, IOException {
+        throw new UnsupportedOperationException();
+      }
+      
+      public boolean isResolved() {
+        return true;
+      }
+      
+      public DeploymentMetadata getDeploymentMetadata() {
+        return _deploymentMF;
+      }
+      
+      public Set<BundleInfo> getBundleInfo() {
+        return _application.getBundleInfo();
+      }
+      
+      public ApplicationMetadata getApplicationMetadata() {
+        return _application.getApplicationMetadata();
+      }
+    };
   }
 
   private Map<DeploymentContent, BundleSuggestion> findBundleSuggestions(

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-runtime-repository/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-runtime-repository/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-runtime-repository/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-runtime-repository/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>application</artifactId>
         <groupId>org.apache.aries.application</groupId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
     
     <modelVersion>4.0.0</modelVersion>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-runtime/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-runtime/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-runtime/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-runtime/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>application</artifactId>
         <groupId>org.apache.aries.application</groupId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
     
     <modelVersion>4.0.0</modelVersion>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-twitter4j/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-twitter4j/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-twitter4j/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-twitter4j/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.aries.application</groupId>
         <artifactId>application</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
     <artifactId>twitter4j</artifactId>
     <packaging>bundle</packaging>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-utils/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-utils/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-utils/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-utils/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.aries.application</groupId>
         <artifactId>application</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>org.apache.aries.application.utils</artifactId>

Modified: aries/sandbox/jbohn/interceptor-proto/application/application-utils/src/main/java/org/apache/aries/application/utils/filesystem/impl/ZipDirectory.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/application-utils/src/main/java/org/apache/aries/application/utils/filesystem/impl/ZipDirectory.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/application-utils/src/main/java/org/apache/aries/application/utils/filesystem/impl/ZipDirectory.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/application-utils/src/main/java/org/apache/aries/application/utils/filesystem/impl/ZipDirectory.java Mon Jan 10 21:03:14 2011
@@ -100,12 +100,17 @@ public class ZipDirectory extends ZipFil
     StringBuilder baseBuilderCrapThingToGetRoundFindBugs = new StringBuilder(getName());
     
     if (!!!isRoot()) baseBuilderCrapThingToGetRoundFindBugs.append('/');
-    
-    if (paths != null && paths.length > 1) {
+    // Build 'result' as a chain of ZipDirectories. This will only work if java.util.ZipFile recognises every 
+    // directory in the chain as being a ZipEntry in its own right. 
+    outer: if (paths != null && paths.length > 1) {
       for (int i = 0; i < paths.length - 1; i++) {
         String path = paths[i];
         baseBuilderCrapThingToGetRoundFindBugs.append(path);
         ZipEntry dirEntry = getEntry(baseBuilderCrapThingToGetRoundFindBugs.toString());
+        if (dirEntry == null) { 
+          result = this;
+          break outer;
+        }
         result = new ZipDirectory(zip, dirEntry, result);
         baseBuilderCrapThingToGetRoundFindBugs.append('/');
       }

Modified: aries/sandbox/jbohn/interceptor-proto/application/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/application/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/application/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/application/pom.xml Mon Jan 10 21:03:14 2011
@@ -19,7 +19,7 @@
     <parent>
         <groupId>org.apache.aries</groupId>
         <artifactId>java5-parent</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
         <relativePath>../parent/default-parent/java5-parent/pom.xml</relativePath>
     </parent>
 
@@ -27,7 +27,7 @@
     <groupId>org.apache.aries.application</groupId>
     <artifactId>application</artifactId>
     <name>Apache Aries Application</name>
-    <version>0.3-incubating-SNAPSHOT</version>
+    <version>0.3-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <description>
@@ -50,22 +50,27 @@
             <dependency>
                 <groupId>org.apache.aries</groupId>
                 <artifactId>org.apache.aries.util</artifactId>
-                <version>0.3-incubating-SNAPSHOT</version>
+                <version>0.3-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.proxy</groupId>
+                <artifactId>org.apache.aries.proxy</artifactId>
+                <version>0.3-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.aries.blueprint</groupId>
                 <artifactId>org.apache.aries.blueprint</artifactId>
-                <version>0.3-incubating-SNAPSHOT</version>
+                <version>0.3-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.aries.testsupport</groupId>
                 <artifactId>org.apache.aries.testsupport.unit</artifactId>
-                <version>0.3-incubating-SNAPSHOT</version>
+                <version>0.3-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.aries.web</groupId>
                 <artifactId>org.apache.aries.web.urlhandler</artifactId>
-                <version>0.3-incubating-SNAPSHOT</version>
+                <version>0.3-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.felix</groupId>

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-api/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-api/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-api/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-api/pom.xml Mon Jan 10 21:03:14 2011
@@ -19,7 +19,7 @@
     <parent>
         <groupId>org.apache.aries.blueprint</groupId>
         <artifactId>blueprint</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>org.apache.aries.blueprint.annotation.api</artifactId>

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-impl/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-impl/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-impl/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-impl/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.aries.blueprint</groupId>
     <artifactId>blueprint</artifactId>
-    <version>0.3-incubating-SNAPSHOT</version>
+    <version>0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.apache.aries.blueprint.annotation.impl</artifactId>

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-itest/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-itest/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-itest/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-itest/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.aries.blueprint</groupId>
         <artifactId>blueprint</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>org.apache.aries.blueprint.annotation.itests</artifactId>
@@ -58,6 +58,10 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.aries.proxy</groupId>
+            <artifactId>org.apache.aries.proxy</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
             <artifactId>org.apache.aries.blueprint.sample</artifactId>
             <scope>test</scope>

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-annotation-itest/src/test/java/org/apache/aries/blueprint/itests/BlueprintAnnotationTest.java Mon Jan 10 21:03:14 2011
@@ -97,6 +97,7 @@ public class BlueprintAnnotationTest ext
 
             // Bundles
             mavenBundle("org.apache.aries", "org.apache.aries.util"),
+            mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
             mavenBundle("asm", "asm-all"),
             mavenBundle("org.apache.xbean", "xbean-finder"),
             mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.annotation.api"),

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-api/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-api/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-api/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-api/pom.xml Mon Jan 10 21:03:14 2011
@@ -19,7 +19,7 @@
     <parent>
         <groupId>org.apache.aries.blueprint</groupId>
         <artifactId>blueprint</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>org.apache.aries.blueprint.api</artifactId>

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-bundle/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-bundle/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-bundle/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-bundle/pom.xml Mon Jan 10 21:03:14 2011
@@ -19,7 +19,7 @@
     <parent>
         <groupId>org.apache.aries.blueprint</groupId>
         <artifactId>blueprint</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>org.apache.aries.blueprint</artifactId>
@@ -35,12 +35,11 @@
             ${project.artifactId};blueprint.graceperiod:=false
         </aries.osgi.symbolic.name>
         <aries.osgi.activator>
-            org.apache.aries.blueprint.uberbundle.UberActivator
+            org.apache.aries.blueprint.container.BlueprintExtender
         </aries.osgi.activator>
         <aries.osgi.import>
             !org.apache.aries.blueprint*,
             !org.osgi.service.blueprint*,
-            !org.objectweb.asm*,
             org.eclipse.osgi.internal.loader;resolution:=optional,
             org.eclipse.osgi.framework.internal.core;resolution:=optional,
             org.eclipse.osgi.framework.adaptor;resolution:=optional,
@@ -57,13 +56,9 @@
             org.osgi.service.blueprint.container;version="1.0.1",
             org.osgi.service.blueprint.reflect;version="1.0.1",
             !org.apache.aries.blueprint.annotation*,
-            org.apache.aries.blueprint*;version="${pom.version}",
-            org.apache.aries.proxy;version=0.3-incubating-SNAPSHOT
+            org.apache.aries.blueprint*;version="${pom.version}"
         </aries.osgi.export>
         <aries.osgi.private.pkg>
-            org.apache.aries.proxy*,
-            org.objectweb.asm*,
-            org.apache.aries.util*,
             OSGI-INF*
         </aries.osgi.private.pkg>
         <aries.osgi.export.service>
@@ -97,11 +92,12 @@
         <dependency>
             <groupId>org.apache.aries.proxy</groupId>
             <artifactId>org.apache.aries.proxy</artifactId>
-            <scope>compile</scope>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>asm</groupId>
             <artifactId>asm-all</artifactId>
+            <scope>test</scope>
             <optional>true</optional>
         </dependency>
         <dependency>

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-cm/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-cm/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-cm/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-cm/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
  <parent>
     <groupId>org.apache.aries.blueprint</groupId>
     <artifactId>blueprint</artifactId>
-    <version>0.3-incubating-SNAPSHOT</version>
+    <version>0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.apache.aries.blueprint.cm</artifactId>

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.aries.blueprint</groupId>
     <artifactId>blueprint</artifactId>
-    <version>0.3-incubating-SNAPSHOT</version>
+    <version>0.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.apache.aries.blueprint.core</artifactId>

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java Mon Jan 10 21:03:14 2011
@@ -44,6 +44,7 @@ import org.apache.aries.blueprint.proxy.
 import org.apache.aries.blueprint.utils.InterceptorManager;
 import org.apache.aries.blueprint.utils.ReflectionUtils;
 import org.apache.aries.blueprint.utils.ReflectionUtils.PropertyDescriptor;
+import org.osgi.framework.Bundle;
 import org.osgi.framework.FrameworkUtil;
 import org.osgi.service.blueprint.container.ComponentDefinitionException;
 import org.osgi.service.blueprint.container.ReifiedType;
@@ -569,11 +570,11 @@ public class BeanRecipe extends Abstract
      */
     private static class BeanCreatorChain implements BeanProcessor.BeanCreator {
         public enum ChainType{Before,After};
-        private BeanProcessor.BeanCreator parentBeanCreator;
-        private BeanProcessor parentBeanProcessor;
-        private BeanMetadata beanData;
-        private String beanName;        
-        private ChainType when;
+        private final BeanProcessor.BeanCreator parentBeanCreator;
+        private final BeanProcessor parentBeanProcessor;
+        private final BeanMetadata beanData;
+        private final String beanName;        
+        private final ChainType when;
         public BeanCreatorChain(BeanProcessor.BeanCreator parentBeanCreator, 
                                 BeanProcessor parentBeanProcessor,
                                 BeanMetadata beanData,
@@ -682,24 +683,17 @@ public class BeanRecipe extends Abstract
         
         if (interceptors != null && interceptors.size() > 0) {
             try {
-                // Try load load an asm class (to make sure it's actually
-                // available)
-                getClass().getClassLoader().loadClass(
-                        "org.objectweb.asm.ClassVisitor");
-                LOGGER.debug("asm available for interceptors");
-            } catch (Throwable t) {
-                throw new ComponentDefinitionException(
-                        "Interceptors have been configured but asm is not available",
-                        t);
-            }
-            // if asm is available we can proxy the original object with the
-            // AsmInterceptorWrapper
-            try {
-              intercepted = BlueprintExtender.getProxyManager().createProxy(FrameworkUtil.getBundle(original.getClass()), 
+              Bundle b = FrameworkUtil.getBundle(original.getClass());
+              if (b == null) {
+                // we have a class from the framework parent, so use our bundle for proxying.
+                b = blueprintContainer.getBundleContext().getBundle();
+              }
+              intercepted = BlueprintExtender.getProxyManager().createProxy(b, 
                   ProxyUtils.asList(original.getClass()), ProxyUtils.passThrough(original), 
                   new Collaborator(interceptorLookupKey, interceptors));
             } catch (org.apache.aries.proxy.UnableToProxyException e) {
-                throw new ComponentDefinitionException("Unable to create asm proxy", e);
+                  Bundle b = blueprintContainer.getBundleContext().getBundle();
+                  throw new ComponentDefinitionException("Unable to create proxy for bean " + name + " in bundle " + b.getSymbolicName() + " version " + b.getVersion(), e);
             }
         } else {
             intercepted = original;
@@ -788,7 +782,7 @@ public class BeanRecipe extends Abstract
             PropertyDescriptor pd = getPropertyDescriptor(clazz, names[i]);
             if (pd.allowsGet()) {
                 try {
-                    instance = pd.get(instance, blueprintContainer.getAccessControlContext());
+                    instance = pd.get(instance, blueprintContainer);
                 } catch (Exception e) {
                     throw new ComponentDefinitionException("Error getting property: " + names[i] + " on bean " + getName() + " when setting property " + propertyName + " on class " + clazz.getName(), getRealCause(e));
                 }
@@ -809,7 +803,7 @@ public class BeanRecipe extends Abstract
         final PropertyDescriptor pd = getPropertyDescriptor(clazz, names[names.length - 1]);
         if (pd.allowsSet()) {
             try {
-                pd.set(instance, propertyValue, blueprintContainer.getAccessControlContext());
+                pd.set(instance, propertyValue, blueprintContainer);
             } catch (Exception e) {
                 throw new ComponentDefinitionException("Error setting property: " + pd, getRealCause(e));
             }
@@ -839,8 +833,8 @@ public class BeanRecipe extends Abstract
 
     private class ArgumentMatcher {
 
-        private List<TypeEntry> entries;
-        private boolean convert;
+        private final List<TypeEntry> entries;
+        private final boolean convert;
 
         public ArgumentMatcher(Type[] types, boolean convert) {
             entries = new ArrayList<TypeEntry>();

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ServiceRecipe.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ServiceRecipe.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ServiceRecipe.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ServiceRecipe.java Mon Jan 10 21:03:14 2011
@@ -418,14 +418,12 @@ public class ServiceRecipe extends Abstr
     	private ComponentMetadata cm;
     	private ServiceMetadata sm;
         private boolean isQuiesceAvailable;
-        private boolean isAsmAvailable;
     	public TriggerServiceFactory(ServiceRecipe serviceRecipe, ServiceMetadata cm)
     	{
     		this.serviceRecipe = serviceRecipe;
     		this.cm = cm;
     		this.sm = cm;
             this.isQuiesceAvailable = isClassAvailable("org.apache.aries.quiesce.participant.QuiesceParticipant");
-            this.isAsmAvailable = isClassAvailable("org.objectweb.asm.ClassVisitor");
     	}
     	
         public Object getService(Bundle bundle, ServiceRegistration registration) {
@@ -447,16 +445,14 @@ public class ServiceRecipe extends Abstr
             if (interceptors.isEmpty()) {
                 return original;
             }
-            // If asm is not available, exit
-            if (!isAsmAvailable) {
-                LOGGER.info("ASM is not available to create a proxy object. Returning the original object instead.");
-                LOGGER.debug(LOG_EXIT, "getService", original);
-                return original;
-            }
 
             Object intercepted;
             try {
                 Bundle b = FrameworkUtil.getBundle(original.getClass());
+                if (b == null) {
+                  // we have a class from the framework parent, so use our bundle for proxying.
+                  b = blueprintContainer.getBundleContext().getBundle();
+                }
                 Callable<Object> target = ProxyUtils.passThrough(original);
                 InvocationHandlerWrapper collaborator = new Collaborator(cm, interceptors);
                 try {
@@ -472,7 +468,8 @@ public class ServiceRecipe extends Abstr
                         classes, target, collaborator);
                 }
             } catch (Throwable u) {
-                LOGGER.info("A problem occurred trying to create a proxy object. Returning the original object instead.", u);
+                Bundle b = blueprintContainer.getBundleContext().getBundle();
+                LOGGER.info("Unable to create a proxy object for the service " + getName() + " defined in bundle " + b.getSymbolicName() + " at version " + b.getVersion() + " with id " + b.getBundleId() + ". Returning the original object instead.", u);
                 LOGGER.debug(LOG_EXIT, "getService", original);
                 return original;
             }

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/utils/ReflectionUtils.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/utils/ReflectionUtils.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/utils/ReflectionUtils.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/utils/ReflectionUtils.java Mon Jan 10 21:03:14 2011
@@ -26,6 +26,7 @@ import java.lang.reflect.Modifier;
 import java.lang.reflect.Type;
 import java.security.AccessControlContext;
 import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
@@ -39,8 +40,10 @@ import java.util.Map;
 import java.util.Set;
 import java.util.WeakHashMap;
 
+import org.apache.aries.blueprint.ExtendedBlueprintContainer;
 import org.apache.aries.blueprint.container.GenericType;
 import org.apache.aries.blueprint.di.ExecutionContext;
+import org.osgi.framework.BundleReference;
 import org.osgi.service.blueprint.container.ComponentDefinitionException;
 
 /**
@@ -280,36 +283,36 @@ public class ReflectionUtils {
         public abstract boolean allowsGet();
         public abstract boolean allowsSet();
         
-        protected abstract Object internalGet(Object instance) throws Exception;
-        protected abstract void internalSet(Object instance, Object value) throws Exception;        
+        protected abstract Object internalGet(ExtendedBlueprintContainer container, Object instance) throws Exception;
+        protected abstract void internalSet(ExtendedBlueprintContainer container, Object instance, Object value) throws Exception;        
         
-        public Object get(final Object instance, AccessControlContext acc) throws Exception {            
-            if (acc == null) {
-                return internalGet(instance);
+        public Object get(final Object instance, final ExtendedBlueprintContainer container) throws Exception {            
+            if (container.getAccessControlContext() == null) {
+                return internalGet(container, instance);
             } else {
                 try {
                     return AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
                         public Object run() throws Exception {
-                            return internalGet(instance);
+                            return internalGet(container, instance);
                         }            
-                    }, acc);
+                    }, container.getAccessControlContext());
                 } catch (PrivilegedActionException e) {
                     throw e.getException();
                 }
             }
         }
 
-        public void set(final Object instance, final Object value, AccessControlContext acc) throws Exception {
-            if (acc == null) {
-                internalSet(instance, value);
+        public void set(final Object instance, final Object value, final ExtendedBlueprintContainer container) throws Exception {
+            if (container.getAccessControlContext() == null) {
+                internalSet(container, instance, value);
             } else {
                 try {
                     AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
                         public Object run() throws Exception {
-                            internalSet(instance, value);
+                            internalSet(container, instance, value);
                             return null;
                         }            
-                    }, acc);
+                    }, container.getAccessControlContext());
                 } catch (PrivilegedActionException e) {
                     throw e.getException();
                 }
@@ -342,16 +345,16 @@ public class ReflectionUtils {
         }
 
         @Override
-        protected Object internalGet(Object instance) throws Exception {
-            if (mpd.allowsGet()) return mpd.internalGet(instance);
-            else if (fpd.allowsGet()) return fpd.internalGet(instance);
+        protected Object internalGet(ExtendedBlueprintContainer container, Object instance) throws Exception {
+            if (mpd.allowsGet()) return mpd.internalGet(container, instance);
+            else if (fpd.allowsGet()) return fpd.internalGet(container, instance);
             else throw new UnsupportedOperationException();
         }
 
         @Override
-        protected void internalSet(Object instance, Object value) throws Exception {
-            if (mpd.allowsSet()) mpd.internalSet(instance, value);
-            else if (fpd.allowsSet()) fpd.internalSet(instance, value);
+        protected void internalSet(ExtendedBlueprintContainer container, Object instance, Object value) throws Exception {
+            if (mpd.allowsSet()) mpd.internalSet(container, instance, value);
+            else if (fpd.allowsSet()) fpd.internalSet(container, instance, value);
             else throw new UnsupportedOperationException();
         }
     }
@@ -372,14 +375,69 @@ public class ReflectionUtils {
             return true;
         }
 
-        protected Object internalGet(Object instance) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
-            field.setAccessible(true);
-            return field.get(instance);
+        protected Object internalGet(ExtendedBlueprintContainer container, final Object instance) throws IllegalArgumentException, IllegalAccessException {
+            if (useContainersPermission(container)) {
+                try {
+                    return AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
+                        public Object run() throws Exception {
+                            field.setAccessible(true);
+                            return field.get(instance);
+                        }                        
+                    });
+                } catch (PrivilegedActionException pae) {
+                    Exception e = pae.getException();
+                    if (e instanceof IllegalAccessException) throw (IllegalAccessException) e;
+                    else throw (RuntimeException) e;
+                }
+            } else {
+                field.setAccessible(true);
+                return field.get(instance);
+            }
         }
 
-        protected void internalSet(Object instance, Object value) throws Exception {
-            field.setAccessible(true);
-            field.set(instance, convert(value, field.getGenericType()));
+        protected void internalSet(ExtendedBlueprintContainer container, final Object instance, Object value) throws Exception {
+            final Object convertedValue = convert(value, field.getGenericType());
+            if (useContainersPermission(container)) {
+                try {
+                    AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
+                        public Object run() throws Exception {
+                            field.setAccessible(true);
+                            field.set(instance, convertedValue);
+                            return null;
+                        }                        
+                    });
+                } catch (PrivilegedActionException pae) {
+                    throw pae.getException();
+                }
+            } else {
+                field.setAccessible(true);
+                field.set(instance, convertedValue);
+            }
+        }
+        
+        /**
+         * Determine whether the field access (in particular the call to {@link Field#setAccessible(boolean)} should be done with the Blueprint extender's
+         * permissions, rather than the joint (more restrictive) permissions of the extender plus the Blueprint bundle.
+         * 
+         * We currently only allow this for classes that originate from inside the Blueprint bundle. Otherwise this would open a potential security hole.
+         * @param container
+         * @return
+         */
+        private boolean useContainersPermission(ExtendedBlueprintContainer container) {
+            ClassLoader loader = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+                public ClassLoader run() {
+                    return field.getDeclaringClass().getClassLoader();
+                }
+            });            
+            
+            if (loader == null) return false;
+            
+            if (loader instanceof BundleReference) {
+                BundleReference ref = (BundleReference) loader;
+                return ref.getBundle().equals(container.getBundleContext().getBundle());                
+            }
+            
+            return false;
         }
     }
     
@@ -401,7 +459,7 @@ public class ReflectionUtils {
             return !!!setters.isEmpty();
         }
         
-        protected Object internalGet(Object instance) 
+        protected Object internalGet(ExtendedBlueprintContainer container, Object instance) 
                 throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
             if (getter != null) {
                 return getter.invoke(instance);
@@ -410,7 +468,7 @@ public class ReflectionUtils {
             }
         }
         
-        protected void internalSet(Object instance, Object value) throws Exception {
+        protected void internalSet(ExtendedBlueprintContainer container, Object instance, Object value) throws Exception {
             
             Method setterMethod = findSetter(value);
 

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/utils/ReflectionUtilsTest.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/utils/ReflectionUtilsTest.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/utils/ReflectionUtilsTest.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/utils/ReflectionUtilsTest.java Mon Jan 10 21:03:14 2011
@@ -28,10 +28,12 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Queue;
 
+import org.apache.aries.blueprint.ExtendedBlueprintContainer;
 import org.apache.aries.blueprint.di.CircularDependencyException;
 import org.apache.aries.blueprint.di.ExecutionContext;
 import org.apache.aries.blueprint.di.Recipe;
 import org.apache.aries.blueprint.utils.ReflectionUtils.PropertyDescriptor;
+import org.apache.aries.unittest.mocks.Skeleton;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.osgi.service.blueprint.container.ComponentDefinitionException;
@@ -41,6 +43,7 @@ import static org.junit.Assert.*;
 
 public class ReflectionUtilsTest {
     private PropertyDescriptor[] sut;
+    private final ExtendedBlueprintContainer mockBlueprint = Skeleton.newMock(ExtendedBlueprintContainer.class);
     
     static class GetterOnly {
         public String getValue() { return "test"; }
@@ -97,7 +100,7 @@ public class ReflectionUtilsTest {
         assertTrue(sut[1].allowsGet());
         assertFalse(sut[1].allowsSet());
         
-        assertEquals("test", sut[1].get(new GetterOnly(), null));
+        assertEquals("test", sut[1].get(new GetterOnly(), mockBlueprint));
     }
     
     static class SetterOnly {
@@ -118,7 +121,7 @@ public class ReflectionUtilsTest {
         assertTrue(sut[1].allowsSet());
         
         SetterOnly so = new SetterOnly();
-        sut[1].set(so, "trial", null);
+        sut[1].set(so, "trial", mockBlueprint);
         assertEquals("trial", so.retrieve());
     }
     
@@ -140,8 +143,8 @@ public class ReflectionUtilsTest {
         assertTrue(sut[1].allowsSet());
         
         SetterAndGetter sag = new SetterAndGetter();
-        sut[1].set(sag, "tribulation", null);
-        assertEquals("tribulation", sut[1].get(sag, null));
+        sut[1].set(sag, "tribulation", mockBlueprint);
+        assertEquals("tribulation", sut[1].get(sag, mockBlueprint));
     }
     
     static class DuplicateGetter {
@@ -177,16 +180,16 @@ public class ReflectionUtilsTest {
         assertTrue(sut[1].allowsGet());
         assertTrue(sut[1].allowsSet());
         
-        assertEquals("ordeal", sut[1].get(fap, null));
-        sut[1].set(fap, "calvary", null);
-        assertEquals("calvary", sut[1].get(fap, null));
+        assertEquals("ordeal", sut[1].get(fap, mockBlueprint));
+        sut[1].set(fap, "calvary", mockBlueprint);
+        assertEquals("calvary", sut[1].get(fap, mockBlueprint));
         
         assertEquals("nonHidden", sut[2].getName());
         assertTrue(sut[2].allowsGet());
         assertTrue(sut[2].allowsSet());
         
-        sut[2].set(fap, "predicament", null);
-        assertEquals("predicament", sut[2].get(fap, null));
+        sut[2].set(fap, "predicament", mockBlueprint);
+        assertEquals("predicament", sut[2].get(fap, mockBlueprint));
     }
     
     static class OverloadedSetters {
@@ -202,14 +205,14 @@ public class ReflectionUtilsTest {
         
         OverloadedSetters os = new OverloadedSetters();
 
-        sut[1].set(os, "scrutiny", null);
+        sut[1].set(os, "scrutiny", mockBlueprint);
         assertEquals("scrutiny", os.field);
         
-        sut[1].set(os, Arrays.asList("evaluation"), null);
+        sut[1].set(os, Arrays.asList("evaluation"), mockBlueprint);
         assertEquals(Arrays.asList("evaluation"), os.field);
         
         // conversion case, Integer -> String
-        sut[1].set(os, new Integer(3), null);
+        sut[1].set(os, new Integer(3), mockBlueprint);
         assertEquals("3", os.field);
     }
     
@@ -217,7 +220,7 @@ public class ReflectionUtilsTest {
     public void testApplicableSetter() throws Exception {
         loadProps(OverloadedSetters.class, false);
         
-        sut[1].set(new OverloadedSetters(), new Inconvertible(), null);
+        sut[1].set(new OverloadedSetters(), new Inconvertible(), mockBlueprint);
     }
     
     static class MultipleMatchesByConversion {
@@ -229,7 +232,7 @@ public class ReflectionUtilsTest {
     public void testMultipleMatchesByConversion() throws Exception {
         loadProps(MultipleMatchesByConversion.class, false);
         
-        sut[1].set(new MultipleMatchesByConversion(), new HashSet<String>(), null);
+        sut[1].set(new MultipleMatchesByConversion(), new HashSet<String>(), mockBlueprint);
     }
     
     static class MultipleMatchesByType {
@@ -246,14 +249,14 @@ public class ReflectionUtilsTest {
     public void testMultipleSettersMatchByType() throws Exception {
         loadProps(MultipleMatchesByType.class, false);
         
-        sut[1].set(new MultipleMatchesByType(), new LinkedList<String>(), null);
+        sut[1].set(new MultipleMatchesByType(), new LinkedList<String>(), mockBlueprint);
     }
     
     @Test
     public void testDisambiguationByHierarchy() throws Exception {
         loadProps(MultipleMatchesByType.class, false);
         
-        sut[2].set(new MultipleMatchesByType(), new ArrayList<String>(), null);
+        sut[2].set(new MultipleMatchesByType(), new ArrayList<String>(), mockBlueprint);
         assertEquals(2, MultipleMatchesByType.field);
     }
     
@@ -268,7 +271,7 @@ public class ReflectionUtilsTest {
     public void testNullDisambiguation() throws Exception {
         loadProps(NullSetterDisambiguation.class, false);
         
-        sut[1].set(new NullSetterDisambiguation(), null, null);
+        sut[1].set(new NullSetterDisambiguation(), null, mockBlueprint);
         assertEquals(-1, NullSetterDisambiguation.field);
     }
     

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-itests/pom.xml?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-itests/pom.xml (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-itests/pom.xml Mon Jan 10 21:03:14 2011
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.aries.blueprint</groupId>
         <artifactId>blueprint</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
+        <version>0.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>org.apache.aries.blueprint.itests</artifactId>
@@ -127,30 +127,34 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+           <groupId>org.apache.aries.proxy</groupId>
+           <artifactId>org.apache.aries.proxy</artifactId>
+     	</dependency>
+        <dependency>
         	<groupId>org.apache.aries.quiesce</groupId>
         	<artifactId>org.apache.aries.quiesce.api</artifactId>
-        	<version>0.3-incubating-SNAPSHOT</version>
+        	<version>0.3-SNAPSHOT</version>
         	<type>bundle</type>
         	<scope>provided</scope>
         </dependency>
         <dependency>
         	<groupId>org.apache.aries.blueprint</groupId>
         	<artifactId>org.apache.aries.blueprint.testquiescebundle</artifactId>
-        	<version>0.3-incubating-SNAPSHOT</version>
+        	<version>0.3-SNAPSHOT</version>
         	<type>bundle</type>
         	<scope>compile</scope>
         </dependency>
         <dependency>
         	<groupId>org.apache.aries.blueprint</groupId>
         	<artifactId>org.apache.aries.blueprint.core</artifactId>
-        	<version>0.3-incubating-SNAPSHOT</version>
+        	<version>0.3-SNAPSHOT</version>
         	<type>bundle</type>
         	<scope>compile</scope>
         </dependency>
         <dependency>
         	<groupId>org.apache.aries.blueprint</groupId>
         	<artifactId>org.apache.aries.blueprint.cm</artifactId>
-        	<version>0.3-incubating-SNAPSHOT</version>
+        	<version>0.3-SNAPSHOT</version>
         	<type>bundle</type>
         	<scope>compile</scope>
         </dependency>

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java Mon Jan 10 21:03:14 2011
@@ -126,6 +126,8 @@ public class BlueprintContainer2BTCustom
 
             // Bundles
             mavenBundle("org.apache.aries", "org.apache.aries.util"),
+            mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
+            mavenBundle("asm", "asm-all"),
             mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint").noStart(),
             // don't install the blueprint sample here as it will be installed onto the same framework as the blueprint core bundle
             // mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample").noStart(),

Modified: aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java
URL: http://svn.apache.org/viewvc/aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java?rev=1057359&r1=1057358&r2=1057359&view=diff
==============================================================================
--- aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java (original)
+++ aries/sandbox/jbohn/interceptor-proto/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java Mon Jan 10 21:03:14 2011
@@ -80,6 +80,8 @@ public class BlueprintContainer2Test ext
             // Bundles
             mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample").noStart(),
             mavenBundle("org.apache.aries", "org.apache.aries.util"),
+            mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
+            mavenBundle("asm", "asm-all"),
             mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint").noStart(),
             mavenBundle("org.osgi", "org.osgi.compendium"),
 //            org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),



Mime
View raw message