incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r1045274 [5/7] - in /incubator/aries/sandbox/jbohn/interceptor-proto: ./ application/ application/application-api/src/main/java/org/apache/aries/application/ application/application-api/src/main/java/org/apache/aries/application/management/...
Date Mon, 13 Dec 2010 18:26:35 GMT
Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/services/ServiceHelper.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/services/ServiceHelper.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/services/ServiceHelper.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/services/ServiceHelper.java Mon Dec 13 18:26:19 2010
@@ -33,7 +33,10 @@ import java.util.concurrent.ConcurrentMa
 
 import javax.naming.NamingException;
 
+import org.apache.aries.jndi.url.Activator;
 import org.apache.aries.jndi.url.OsgiName;
+import org.apache.aries.proxy.ProxyManager;
+import org.apache.aries.proxy.UnableToProxyException;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;
@@ -157,21 +160,33 @@ public final class ServiceHelper
     private String interfaceName;
     private String filter;
     private boolean dynamic;
+    private int rebindTimeout;
 
     public JNDIServiceDamper(BundleContext context, String i, String f, ServicePair service,
-        boolean d)
+        boolean d, int timeout)
     {
       ctx = context;
       pair = service;
       interfaceName = i;
       filter = f;
       dynamic = d;
+      rebindTimeout = timeout;
     }
 
     public Object call() throws NamingException {
       if (pair == null || pair.ref.getBundle() == null) {
         if (dynamic) {
           pair = findService(ctx, interfaceName, filter);
+          if (pair == null && rebindTimeout > 0) {
+            long startTime = System.currentTimeMillis();
+            try {
+              while (pair == null && System.currentTimeMillis() - startTime < rebindTimeout) {
+                Thread.sleep(100);
+                pair = findService(ctx, interfaceName, filter);
+              }
+            } catch (InterruptedException e) {
+            }
+          }
         } else {
           pair = null;
         }
@@ -194,8 +209,6 @@ public final class ServiceHelper
   private static final ConcurrentMap<ServiceKey, WeakReference<Object>> proxyCache = new ConcurrentHashMap<ServiceKey, WeakReference<Object>>();
   private static final CacheClearoutListener cacheClearoutListener = new CacheClearoutListener(proxyCache);
 
-  private static ProxyFactory proxyFactory;
-
   public static Object getService(BundleContext ctx, OsgiName lookupName, String id,
                                   boolean dynamicRebind, Map<String, Object> env, boolean requireProxy) throws NamingException
   {    
@@ -232,7 +245,15 @@ public final class ServiceHelper
     
     if (pair != null) {
       if (requireProxy) {
-        result = proxy(interfaceName, filter, dynamicRebind, ctx, pair);
+        Object obj = env.get(org.apache.aries.jndi.api.JNDIConstants.REBIND_TIMEOUT);
+        int timeout = 0;
+        if (obj instanceof String) {
+          timeout = Integer.parseInt((String)obj);
+        } else if (obj instanceof Integer) {
+          timeout = (Integer)obj;
+        }
+        
+        result = proxy(interfaceName, filter, dynamicRebind, ctx, pair, timeout);
       } else {
         result = pair.service;
       }
@@ -242,7 +263,7 @@ public final class ServiceHelper
   }
 
   private static Object proxy(final String interface1, final String filter, final boolean rebind,
-                              final BundleContext ctx, final ServicePair pair)
+                              final BundleContext ctx, final ServicePair pair, final int timeout)
   {
     Object result = null;
     Bundle owningBundle = ctx.getBundle();
@@ -261,7 +282,7 @@ public final class ServiceHelper
       result = AccessController.doPrivileged(new PrivilegedAction<Object>() {
         public Object run()
         {
-          return proxyPriviledged(interface1, filter, rebind, ctx, pair);
+          return proxyPriviledged(interface1, filter, rebind, ctx, pair, timeout);
         }
       });
 
@@ -275,7 +296,7 @@ public final class ServiceHelper
     return result;
   }
 
-  private static Object proxyPriviledged(String interface1, String filter, boolean dynamicRebind, BundleContext ctx, ServicePair pair)
+  private static Object proxyPriviledged(String interface1, String filter, boolean dynamicRebind, BundleContext ctx, ServicePair pair, int timeout)
   {
     String[] interfaces = null;
     if (interface1 != null) {
@@ -311,7 +332,7 @@ public final class ServiceHelper
     Bundle serviceProviderBundle = pair.ref.getBundle();
     Bundle owningBundle = ctx.getBundle();
 
-    ProxyFactory proxyFactory = getProxyFactory();
+    ProxyManager proxyManager = Activator.getProxyManager();
 
     for (String interfaceName : interfaces) {
       try {
@@ -327,7 +348,7 @@ public final class ServiceHelper
       throw new IllegalArgumentException(Arrays.asList(interfaces).toString());
     }
 
-    Callable<Object> ih = new JNDIServiceDamper(ctx, interface1, filter, pair, dynamicRebind);
+    Callable<Object> ih = new JNDIServiceDamper(ctx, interface1, filter, pair, dynamicRebind, timeout);
 
     // The ClassLoader needs to be able to load the service interface
     // classes so it needs to be
@@ -335,9 +356,9 @@ public final class ServiceHelper
     // on this adapter.
 
     try {
-      return proxyFactory.createProxy(serviceProviderBundle, clazz, ih);
-    } catch (IllegalArgumentException e) {
-      throw e;
+      return proxyManager.createProxy(serviceProviderBundle, clazz, ih);
+    } catch (UnableToProxyException e) {
+      throw new IllegalArgumentException(e);
     } catch (RuntimeException e) {
       throw new IllegalArgumentException("Unable to create proxy for " + pair.ref, e);
     }
@@ -422,24 +443,10 @@ public final class ServiceHelper
       pair.ref = ref;
       pair.service = service;
 
-      result = proxy(null, null, false, ctx, pair);
+      result = proxy(null, null, false, ctx, pair, 0);
     }
 
     return result;
   }
-
-  protected static synchronized ProxyFactory getProxyFactory() {
-    if (proxyFactory == null) {
-      try {
-        // Try load load a cglib class (to make sure it's actually available
-        // then create the cglib factory
-        Class.forName("net.sf.cglib.proxy.Enhancer");
-        proxyFactory = new CgLibProxyFactory();
-      } catch (Throwable t) {
-        proxyFactory = new JdkProxyFactory();
-      }
-    }
-    return proxyFactory;
-  }
  
 }

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java Mon Dec 13 18:26:19 2010
@@ -22,23 +22,77 @@ import java.util.Hashtable;
 
 import javax.naming.spi.ObjectFactory;
 
+import org.apache.aries.proxy.ProxyManager;
+import org.apache.aries.util.SingleServiceTracker;
+import org.apache.aries.util.SingleServiceTracker.SingleServiceListener;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.jndi.JNDIConstants;
 
-public class Activator implements BundleActivator {
-
-    private ServiceRegistration reg;
-
-    public void start(BundleContext context) {
-        Hashtable<Object, Object> props = new Hashtable<Object, Object>();
-        props.put(JNDIConstants.JNDI_URLSCHEME, new String[] { "osgi", "aries" });
-        reg = context.registerService(ObjectFactory.class.getName(), new OsgiURLContextServiceFactory(), props);
+public class Activator implements BundleActivator, SingleServiceListener 
+{
+    private BundleContext ctx;
+    private volatile ServiceRegistration osgiUrlReg = null;
+    private volatile ServiceRegistration blueprintUrlReg = null;
+    private static SingleServiceTracker<ProxyManager> proxyManager;
+
+    @Override
+    public void start(BundleContext context) 
+    {
+        ctx = context;
+        proxyManager = new SingleServiceTracker<ProxyManager>(context, ProxyManager.class, this);
+        proxyManager.open();
     }
 
+    @Override
     public void stop(BundleContext context) {
-        reg.unregister();
+      proxyManager.close();
+      if (osgiUrlReg != null) osgiUrlReg.unregister();
+      if (blueprintUrlReg != null) blueprintUrlReg.unregister();
+    }
+  
+
+  @Override
+  public void serviceFound() 
+  {
+    Hashtable<Object, Object> osgiUrlprops = new Hashtable<Object, Object>();
+    osgiUrlprops.put(JNDIConstants.JNDI_URLSCHEME, new String[] { "osgi", "aries" });
+    osgiUrlReg = ctx.registerService(ObjectFactory.class.getName(),
+        new OsgiURLContextServiceFactory(), osgiUrlprops);
+
+    // Blueprint URL scheme requires access to the BlueprintContainer service.
+    // We have an optional import
+    // on org.osgi.service.blueprint.container: only register the blueprint:comp/URL
+    // scheme if it's present
+    try {
+      ctx.getBundle().loadClass("org.osgi.service.blueprint.container.BlueprintContainer");
+      Hashtable<Object, Object> blueprintURlSchemeProps = new Hashtable<Object, Object>();
+      blueprintURlSchemeProps.put(JNDIConstants.JNDI_URLSCHEME, new String[] { "blueprint" });
+      blueprintUrlReg = ctx.registerService(ObjectFactory.class.getName(),
+          new BlueprintURLContextServiceFactory(), blueprintURlSchemeProps);
+    } catch (ClassNotFoundException cnfe) {
+      // The blueprint packages aren't available, so do nothing. That's fine.
     }
+  }
 
-}
+  @Override
+  public void serviceLost() 
+  {
+    if (osgiUrlReg != null) osgiUrlReg.unregister();
+    osgiUrlReg = null;
+    if (blueprintUrlReg != null) blueprintUrlReg.unregister();
+    blueprintUrlReg = null;
+  }
+
+  @Override
+  public void serviceReplaced() 
+  {
+    
+  }
+    
+  public static ProxyManager getProxyManager()
+  {
+    return proxyManager == null ? null : proxyManager.getService();
+  }
+}
\ No newline at end of file

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/OsgiName.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/OsgiName.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/OsgiName.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/OsgiName.java Mon Dec 13 18:26:19 2010
@@ -18,12 +18,8 @@
  */
 package org.apache.aries.jndi.url;
 
-import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Enumeration;
-import java.util.List;
 
-import javax.naming.CompositeName;
 import javax.naming.InvalidNameException;
 import javax.naming.Name;
 
@@ -35,7 +31,7 @@ import javax.naming.Name;
  * component 1: interface
  * component 2: filter
  */
-public final class OsgiName extends CompositeName
+public final class OsgiName extends AbstractName
 {
   /** The serial version UID */
   private static final long serialVersionUID = 6617580228852444656L;
@@ -56,33 +52,6 @@ public final class OsgiName extends Comp
     this(name.toString());
   }
 
-  private static Enumeration<String> split(String name)
-  {
-    List<String> elements = new ArrayList<String>();
-
-    StringBuilder builder = new StringBuilder();
-    
-    int len = name.length();
-    int count = 0;
-    
-    for (int i = 0; i < len; i++) {
-      char c = name.charAt(i);
-      
-      if (c == '/' && count == 0) {
-        elements.add(builder.toString());
-        builder = new StringBuilder();
-        continue;
-      } else if (c == '(') count++;
-      else if (c == ')') count++;
-      
-      builder.append(c);
-    }
-    
-    elements.add(builder.toString());
-    
-    return Collections.enumeration(elements);
-  }
-
   public boolean hasFilter()
   {
     return size() == 3;
@@ -93,38 +62,6 @@ public final class OsgiName extends Comp
     return size() > 3;
   }
   
-  public String getScheme()
-  {
-    String part0 = get(0);
-    int index = part0.indexOf(':');
-    
-    String result;
-    
-    if (index > 0) {
-      result = part0.substring(0, index);
-    } else {
-      result = null;
-    }
-    
-    return result;
-  }
-  
-  public String getSchemePath()
-  {
-    String part0 = get(0);
-    int index = part0.indexOf(':');
-    
-    String result;
-    
-    if (index > 0) {
-      result = part0.substring(index + 1);
-    } else {
-      result = null;
-    }
-    
-    return result;
-  }
-  
   public String getInterface()
   {
     return get(1);

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryListContext.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryListContext.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryListContext.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryListContext.java Mon Dec 13 18:26:19 2010
@@ -56,7 +56,7 @@ public class ServiceRegistryListContext 
     private ServiceNamingEnumeration(BundleContext context, ServiceReference[] theRefs, ThingManager<T> manager)
     {
       ctx = context;
-      refs = theRefs;
+      refs = (theRefs != null) ? theRefs : new ServiceReference[0];
       mgr = manager;
     }
     

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/test/java/org/apache/aries/jndi/url/ServiceRegistryContextTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/test/java/org/apache/aries/jndi/url/ServiceRegistryContextTest.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/test/java/org/apache/aries/jndi/url/ServiceRegistryContextTest.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jndi/jndi-url/src/test/java/org/apache/aries/jndi/url/ServiceRegistryContextTest.java Mon Dec 13 18:26:19 2010
@@ -24,9 +24,15 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
 import java.sql.SQLException;
+import java.util.Collection;
 import java.util.Hashtable;
+import java.util.Iterator;
 import java.util.Properties;
+import java.util.concurrent.Callable;
 
 import javax.naming.Binding;
 import javax.naming.Context;
@@ -38,9 +44,12 @@ import javax.naming.NamingException;
 import javax.naming.spi.ObjectFactory;
 import javax.sql.DataSource;
 
+import org.apache.aries.jndi.api.JNDIConstants;
 import org.apache.aries.mocks.BundleContextMock;
 import org.apache.aries.mocks.BundleMock;
+import org.apache.aries.proxy.ProxyManager;
 import org.apache.aries.unittest.mocks.MethodCall;
+import org.apache.aries.unittest.mocks.MethodCallHandler;
 import org.apache.aries.unittest.mocks.Skeleton;
 import org.junit.After;
 import org.junit.Before;
@@ -77,6 +86,7 @@ public class ServiceRegistryContextTest
   public void registerService() throws NamingException, SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException 
   {
     bc =  Skeleton.newMock(new BundleContextMock(), BundleContext.class);
+    registerProxyManager();
     new org.apache.aries.jndi.startup.Activator().start(bc);
     new Activator().start(bc);
         
@@ -85,6 +95,43 @@ public class ServiceRegistryContextTest
     registerService(service);
   }
   
+  private void registerProxyManager() 
+  {
+    ProxyManager mgr = Skeleton.newMock(ProxyManager.class);
+    
+    //   public Object createProxy(Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher) throws UnableToProxyException;
+
+    Skeleton.getSkeleton(mgr).registerMethodCallHandler(new MethodCall(ProxyManager.class, "createProxy", Bundle.class, Collection.class, Callable.class),
+        new MethodCallHandler() 
+        {
+          public Object handle(MethodCall methodCall, Skeleton skeleton) throws Exception 
+          {
+            @SuppressWarnings("unchecked")
+            Collection<Class<?>> interfaceClasses = (Collection<Class<?>>) methodCall.getArguments()[1];
+            Class<?>[] classes = new Class<?>[interfaceClasses.size()];
+            
+            Iterator<Class<?>> it = interfaceClasses.iterator(); 
+            for (int i = 0; it.hasNext(); i++) {
+              classes[i] = it.next();
+            }
+            
+            @SuppressWarnings("unchecked")
+            final Callable<Object> target = (Callable<Object>) methodCall.getArguments()[2];
+            
+            return Proxy.newProxyInstance(this.getClass().getClassLoader(), classes, new InvocationHandler() 
+            {
+              public Object invoke(Object mock, Method method, Object[] arguments)
+                  throws Throwable 
+              {
+                return method.invoke(target.call(), arguments);
+              }
+            });
+          }
+        });
+    
+    bc.registerService(ProxyManager.class.getName(), mgr, null);
+  }
+
   /**
    * Register a service in our map.
    * 
@@ -134,6 +181,37 @@ public class ServiceRegistryContextTest
      assertTrue("expected non-proxied service class", r2 == service);
   }
   
+  @Test
+  public void testLookupWithPause() throws NamingException
+  {
+     BundleMock mock = new BundleMock("scooby.doo", new Properties());
+        
+     Thread.currentThread().setContextClassLoader(mock.getClassLoader());
+
+     Hashtable<Object, Object> env = new Hashtable<Object, Object>();
+     env.put(JNDIConstants.REBIND_TIMEOUT, 1000);
+     
+     InitialContext ctx = new InitialContext(env);
+     
+     Context ctx2 = (Context) ctx.lookup("osgi:service");
+     
+     Runnable r1 = (Runnable) ctx2.lookup("java.lang.Runnable");   
+     
+     reg.unregister();
+     
+     long startTime = System.currentTimeMillis();
+     
+     try {
+       r1.run();
+       fail("Should have received an exception");
+     } catch (ServiceException e) {
+       long endTime = System.currentTimeMillis();
+       long diff = endTime - startTime;
+       
+       assertTrue("The run method did not fail in the expected time (1s): " + diff, diff >= 1000);
+     }
+  }
+  
   /**
    * This test checks that we correctly register and deregister the url context
    * object factory in the service registry.

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jndi/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jndi/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jndi/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jndi/pom.xml Mon Dec 13 18:26:19 2010
@@ -22,6 +22,7 @@
         <groupId>org.apache.aries</groupId>
         <artifactId>java5-parent</artifactId>
         <version>0.3-incubating-SNAPSHOT</version>
+        <relativePath>../parent/default-parent/java5-parent/pom.xml</relativePath>
     </parent>  
 
     <modelVersion>4.0.0</modelVersion>
@@ -61,6 +62,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.aries.jndi</groupId>
+                <artifactId>org.apache.aries.jndi.rmi</artifactId>
+                <version>${version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.jndi</groupId>
                 <artifactId>org.apache.aries.jndi</artifactId>
                 <version>${version}</version>
             </dependency>
@@ -75,13 +81,11 @@
             	<artifactId>org.apache.aries.util</artifactId>
             	<version>0.3-incubating-SNAPSHOT</version>
             </dependency>
-            <!-- Use an OSGi enabled cglib version, so that BND can find the version information
-                 and we can use it in integration tests -->
-            <dependency>
-                <groupId>org.apache.servicemix.bundles</groupId>
-                <artifactId>org.apache.servicemix.bundles.cglib</artifactId>
-                <version>2.1_3_4</version>
-            </dependency>
+	        <dependency>
+	            <groupId>org.apache.aries.proxy</groupId>
+	            <artifactId>org.apache.aries.proxy.api</artifactId>
+	            <version>0.3-incubating-SNAPSHOT</version>
+	        </dependency>
         </dependencies>
     </dependencyManagement>
     
@@ -97,7 +101,9 @@
         <module>jndi-api</module>
         <module>jndi-core</module>
         <module>jndi-url</module>
+        <module>jndi-rmi</module>
         <module>jndi-bundle</module>
+        <module>jndi-legacy-support</module>
     </modules>
 
 </project>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-context/src/main/java/org/apache/aries/jpa/container/context/impl/PersistenceContextManager.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-context/src/main/java/org/apache/aries/jpa/container/context/impl/PersistenceContextManager.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-context/src/main/java/org/apache/aries/jpa/container/context/impl/PersistenceContextManager.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-context/src/main/java/org/apache/aries/jpa/container/context/impl/PersistenceContextManager.java Mon Dec 13 18:26:19 2010
@@ -26,8 +26,8 @@ import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.Map.Entry;
+import java.util.Set;
 
 import javax.persistence.EntityManagerFactory;
 import javax.persistence.PersistenceContextType;
@@ -434,12 +434,21 @@ public class PersistenceContextManager e
       //Find the ManagedFactories for the persistence unit
       List<ManagedPersistenceContextFactory> factoriesToQuiesce = new ArrayList<ManagedPersistenceContextFactory>();
       synchronized (this) {
-        for(String name : units) {
-          ServiceRegistration reg = entityManagerRegistrations.get(name);
+        Iterator<String> it = units.iterator();
+        while(it.hasNext()) {
+          ServiceRegistration reg = entityManagerRegistrations.get(it.next());
+          //If there's no managed factory then we don't need to quiesce this unit
+          boolean needsQuiesce = false;
           if(reg != null) {
             ManagedPersistenceContextFactory fact = (ManagedPersistenceContextFactory) bundleToQuiesce.getBundleContext().getService(reg.getReference());
-            if(fact != null)
+            if(fact != null) {
               factoriesToQuiesce.add(fact);
+              needsQuiesce = true;
+            }
+          }
+          //If the unit doesn't need quiescing then remove it from our check
+          if(!!!needsQuiesce) {
+            it.remove();
           }
         }
       }

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerTest.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerTest.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerTest.java Mon Dec 13 18:26:19 2010
@@ -21,14 +21,9 @@ import static org.ops4j.pax.exam.CoreOpt
 import static org.ops4j.pax.exam.CoreOptions.wrappedBundle;
 import static org.ops4j.pax.exam.OptionUtils.combine;
 
-import java.util.Hashtable;
-
 import javax.persistence.EntityManagerFactory;
-import javax.persistence.spi.PersistenceProvider;
 
 import org.apache.aries.jpa.container.PersistenceUnitConstants;
-import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.CoreOptions;
@@ -44,7 +39,6 @@ import org.osgi.framework.Filter;
 import org.osgi.framework.FrameworkUtil;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.Version;
-import org.osgi.service.packageadmin.PackageAdmin;
 import org.osgi.util.tracker.ServiceTracker;
 
 @RunWith(JUnit4TestRunner.class)
@@ -58,6 +52,23 @@ public class JPAContainerTest {
   public void findEntityManagerFactory() throws Exception {
     EntityManagerFactory emf = getOsgiService(EntityManagerFactory.class, "(&(osgi.unit.name=test-unit)(" + PersistenceUnitConstants.CONTAINER_MANAGED_PERSISTENCE_UNIT + "=true))", DEFAULT_TIMEOUT);
   }
+  
+  @Test
+  public void findEntityManagerFactory2() throws Exception {
+    EntityManagerFactory emf = getOsgiService(EntityManagerFactory.class, "(&(osgi.unit.name=bp-test-unit)(" + PersistenceUnitConstants.CONTAINER_MANAGED_PERSISTENCE_UNIT + "=true))", DEFAULT_TIMEOUT);
+  }
+  
+  @Test
+  public void findEntityManager() throws Exception {
+    EntityManagerFactory emf = getOsgiService(EntityManagerFactory.class, "(&(osgi.unit.name=test-unit)(" + PersistenceUnitConstants.CONTAINER_MANAGED_PERSISTENCE_UNIT + "=true))", DEFAULT_TIMEOUT);
+    emf.createEntityManager();
+  }
+  
+  @Test
+  public void findEntityManager2() throws Exception {
+    EntityManagerFactory emf = getOsgiService(EntityManagerFactory.class, "(&(osgi.unit.name=bp-test-unit)(" + PersistenceUnitConstants.CONTAINER_MANAGED_PERSISTENCE_UNIT + "=true))", DEFAULT_TIMEOUT);
+    emf.createEntityManager();
+  }
 
   @org.ops4j.pax.exam.junit.Configuration
   public static Option[] configuration() {
@@ -77,18 +88,27 @@ public class JPAContainerTest {
         systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
 
         // Bundles
-        mavenBundle("org.osgi", "org.osgi.compendium"),
+        mavenBundle("commons-lang", "commons-lang"),
+        mavenBundle("commons-collections", "commons-collections"),
+        mavenBundle("commons-pool", "commons-pool"),
         mavenBundle("org.apache.aries", "org.apache.aries.util"),
-        mavenBundle("org.apache.geronimo.specs", "geronimo-jpa_2.0_spec"),
+        mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
+        mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi.api"),
+        mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi.core"),
+        mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi.url"),
         mavenBundle("org.apache.aries.jpa", "org.apache.aries.jpa.api"),
         mavenBundle("org.apache.aries.jpa", "org.apache.aries.jpa.container"),
+        mavenBundle("org.apache.derby", "derby"),
         mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
-        mavenBundle("commons-lang", "commons-lang"),
-        mavenBundle("commons-collections", "commons-collections"),
-        mavenBundle("commons-pool", "commons-pool"),
-        mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.serp"),
+        mavenBundle("org.apache.geronimo.specs", "geronimo-jpa_2.0_spec"),
         mavenBundle("org.apache.openjpa", "openjpa"),
+        mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.serp"),
+        mavenBundle("org.osgi", "org.osgi.compendium"),
 
+        //vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006"),
+        //waitForFrameworkStartup(),
+        
+       
 //        mavenBundle("org.eclipse.persistence", "org.eclipse.persistence.jpa"),
 //        mavenBundle("org.eclipse.persistence", "org.eclipse.persistence.core"),
 //        mavenBundle("org.eclipse.persistence", "org.eclipse.persistence.asm"),

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/context/itest/JPAContextTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/context/itest/JPAContextTest.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/context/itest/JPAContextTest.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/context/itest/JPAContextTest.java Mon Dec 13 18:26:19 2010
@@ -25,7 +25,6 @@ import static org.ops4j.pax.exam.CoreOpt
 import static org.ops4j.pax.exam.OptionUtils.combine;
 
 import java.util.HashMap;
-import java.util.Map;
 
 import javax.persistence.EntityManagerFactory;
 import javax.persistence.PersistenceContextType;
@@ -105,10 +104,13 @@ public class JPAContextTest {
         // Bundles
         mavenBundle("org.osgi", "org.osgi.compendium"),
         mavenBundle("org.apache.aries", "org.apache.aries.util"),
+        // Adding blueprint to the runtime is a hack to placate the maven bundle plugin. 
+        mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
         mavenBundle("org.apache.geronimo.specs", "geronimo-jpa_2.0_spec"),
         mavenBundle("org.apache.aries.jpa", "org.apache.aries.jpa.api"),
         mavenBundle("org.apache.aries.jpa", "org.apache.aries.jpa.container"),
         mavenBundle("org.apache.aries.jpa", "org.apache.aries.jpa.container.context"),
+        mavenBundle("org.apache.derby", "derby"),
         mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
         mavenBundle("commons-lang", "commons-lang"),
         mavenBundle("commons-collections", "commons-collections"),

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/quiesce/itest/QuiesceJPATest.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/quiesce/itest/QuiesceJPATest.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/quiesce/itest/QuiesceJPATest.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/quiesce/itest/QuiesceJPATest.java Mon Dec 13 18:26:19 2010
@@ -651,6 +651,8 @@ public class QuiesceJPATest {
         // Bundles
         mavenBundle("org.osgi", "org.osgi.compendium"),
         mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.cglib"),
+        mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy.api"),
+        mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy.impl"),
         mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi.api"),
         mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi.core"),
         mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi.url"),

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-testbundle/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-testbundle/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-testbundle/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-testbundle/pom.xml Mon Dec 13 18:26:19 2010
@@ -55,6 +55,7 @@
                         <Export-Package>
                             org.apache.aries.jpa.container.itest.entities;version="${pom.version}",
                         </Export-Package>
+                        <Private-Package>org.apache.aries.jpa.container.itest</Private-Package>
                         <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
                         <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders>
                         <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml Mon Dec 13 18:26:19 2010
@@ -32,4 +32,12 @@
       
     </properties>
   </persistence-unit>
+  
+  <persistence-unit name="bp-test-unit" transaction-type="RESOURCE_LOCAL">
+    <description>Test persistence unit for the JPA Container and Context iTests</description>
+    <jta-data-source>blueprint:comp/jta</jta-data-source>
+    <non-jta-data-source>blueprint:comp/nonjta</non-jta-data-source>
+    <class>org.apache.aries.jpa.container.itest.entities.Car</class>
+    <exclude-unlisted-classes>true</exclude-unlisted-classes>
+  </persistence-unit>
 </persistence>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/unit/impl/DelayedLookupDataSource.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/unit/impl/DelayedLookupDataSource.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/unit/impl/DelayedLookupDataSource.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/unit/impl/DelayedLookupDataSource.java Mon Dec 13 18:26:19 2010
@@ -21,11 +21,14 @@ package org.apache.aries.jpa.container.u
 import java.io.PrintWriter;
 import java.sql.Connection;
 import java.sql.SQLException;
+import java.util.Hashtable;
 
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import javax.sql.DataSource;
 
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -39,7 +42,16 @@ public class DelayedLookupDataSource imp
   private DataSource getDs() {
     if(ds == null) {
       try {
-        InitialContext ctx = new InitialContext();
+        
+        Hashtable<String, Object> props = new Hashtable<String, Object>();
+        
+        BundleContext bCtx = persistenceBundle.getBundleContext();
+        if(bCtx == null)
+          throw new IllegalStateException("The bundle " + 
+              persistenceBundle.getSymbolicName() + "_" + persistenceBundle.getVersion() + 
+              " is not started.");
+        props.put("osgi.service.jndi.bundleContext", bCtx);
+        InitialContext ctx = new InitialContext(props);
         ds = (DataSource) ctx.lookup(jndiName);
       } catch (NamingException e) {
         _logger.error("No JTA datasource could be located using the JNDI name " + jndiName,
@@ -51,9 +63,11 @@ public class DelayedLookupDataSource imp
   }
 
   private final String jndiName;
+  private final Bundle persistenceBundle;
   
-  public DelayedLookupDataSource (String jndi) {
+  public DelayedLookupDataSource (String jndi, Bundle persistenceBundle) {
     jndiName = jndi;
+    this.persistenceBundle = persistenceBundle;
   }
   
   public Connection getConnection() throws SQLException {

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/unit/impl/PersistenceUnitInfoImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/unit/impl/PersistenceUnitInfoImpl.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/unit/impl/PersistenceUnitInfoImpl.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/unit/impl/PersistenceUnitInfoImpl.java Mon Dec 13 18:26:19 2010
@@ -94,7 +94,7 @@ public class PersistenceUnitInfoImpl imp
     String jndiString = (String) unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.JTA_DATASOURCE);
     DataSource toReturn = null;
     if(jndiString != null) {
-      toReturn = new DelayedLookupDataSource(jndiString);
+      toReturn = new DelayedLookupDataSource(jndiString, bundle);
     }
     return toReturn;
   }
@@ -126,7 +126,7 @@ public class PersistenceUnitInfoImpl imp
     String jndiString = (String) unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.NON_JTA_DATASOURCE);
     DataSource toReturn = null;
     if(jndiString != null) {
-      toReturn = new DelayedLookupDataSource(jndiString);
+      toReturn = new DelayedLookupDataSource(jndiString, bundle);
     }
     return toReturn;
   }

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/jpa/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/jpa/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/jpa/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/jpa/pom.xml Mon Dec 13 18:26:19 2010
@@ -22,6 +22,7 @@
         <artifactId>java5-parent</artifactId>
         <groupId>org.apache.aries</groupId>
         <version>0.3-incubating-SNAPSHOT</version>
+        <relativePath>../parent/default-parent/java5-parent/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.aries.jpa</groupId>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/pom.xml Mon Dec 13 18:26:19 2010
@@ -51,6 +51,7 @@
         <module>jpa</module>
         <module>spi-fly</module>
         <module>samples</module>
+        <module>proxy</module>
     </modules>
 
     <build>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/proxy/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/proxy/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/proxy/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/proxy/pom.xml Mon Dec 13 18:26:19 2010
@@ -22,6 +22,7 @@
         <groupId>org.apache.aries</groupId>
         <artifactId>java5-parent</artifactId>
         <version>0.3-incubating-SNAPSHOT</version>
+        <relativePath>../parent/default-parent/java5-parent/pom.xml</relativePath>
     </parent>  
 
     <modelVersion>4.0.0</modelVersion>
@@ -50,6 +51,11 @@
                 <artifactId>asm-all</artifactId>
                 <version>3.2</version>
             </dependency>
+            <dependency>
+            	<groupId>org.apache.aries</groupId>
+            	<artifactId>org.apache.aries.util</artifactId>
+            	<version>${project.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/pom.xml Mon Dec 13 18:26:19 2010
@@ -19,8 +19,8 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <groupId>org.apache.aries</groupId>
-        <artifactId>java5-parent</artifactId>
+        <groupId>org.apache.aries.proxy</groupId>
+        <artifactId>proxy</artifactId>
         <version>0.3-incubating-SNAPSHOT</version>
     </parent>
 

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/java/org/apache/aries/proxy/ProxyManager.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/java/org/apache/aries/proxy/ProxyManager.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/java/org/apache/aries/proxy/ProxyManager.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-api/src/main/java/org/apache/aries/proxy/ProxyManager.java Mon Dec 13 18:26:19 2010
@@ -18,9 +18,30 @@
  */
 package org.apache.aries.proxy;
 
+import java.util.Collection;
+import java.util.concurrent.Callable;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * The proxy manager service allows clients to generate and manage proxies.
+ */
 public interface ProxyManager 
 {
-  public ProxyFactory createProxyFactory();
-  public ProxyFactory createProxyFactory(boolean interfaceProxyingOnly);
-  public Object unwrap(Object proxy);
+  public Object createProxy(Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher) throws UnableToProxyException;
+  public Object createProxy(Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher, InvocationHandlerWrapper wrapper) throws UnableToProxyException;
+  /**
+   * This method unwraps the provided proxy returning the target object.
+   * 
+   * @param proxy the proxy to unwrap.
+   * @return      the target object.
+   */
+  public Callable<Object> unwrap(Object proxy);
+  /**
+   * Returns true if and only if the specified object was generated by a ProxyFactory returned by
+   * a call to {@link ProxyManager#createProxyFactory(boolean)}.
+   * @param proxy The proxy object to test
+   * @return      true if it is a proxy, false otherwise.
+   */
+  public boolean isProxy(Object proxy);
 }
\ No newline at end of file

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-bundle/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-bundle/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-bundle/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-bundle/pom.xml Mon Dec 13 18:26:19 2010
@@ -19,8 +19,8 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <groupId>org.apache.aries</groupId>
-        <artifactId>java5-parent</artifactId>
+        <groupId>org.apache.aries.proxy</groupId>
+        <artifactId>proxy</artifactId>
         <version>0.3-incubating-SNAPSHOT</version>
     </parent>
 
@@ -39,14 +39,22 @@
     </scm>
 
     <properties>
+        <aries.osgi.activator>
+            org.apache.aries.proxy.impl.ProxyManagerActivator
+        </aries.osgi.activator>
         <aries.osgi.export.pkg>
             org.apache.aries.proxy;
         </aries.osgi.export.pkg>
         <aries.osgi.import.pkg>
+            org.eclipse.*;resolution:=optional,
+            org.objectweb.asm;resolution:=optional,
+            org.objectweb.asm.commons;resolution:=optional,
             *
         </aries.osgi.import.pkg>
         <aries.osgi.private.pkg>
-            org.apache.aries.proxy.impl
+            org.apache.aries.util*,
+            org.objectweb.asm*,
+            org.apache.aries.proxy.impl*
         </aries.osgi.private.pkg>
     </properties>
 
@@ -77,6 +85,16 @@
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+        	<groupId>org.apache.aries.proxy</groupId>
+        	<artifactId>org.apache.aries.proxy.api</artifactId>
+        	<version>${project.version}</version>
+        </dependency>
+        <dependency>
+        	<groupId>org.apache.aries.proxy</groupId>
+        	<artifactId>org.apache.aries.proxy.impl</artifactId>
+        	<version>${project.version}</version>
+        </dependency>
     </dependencies>
 
 </project>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/proxy/proxy-impl/pom.xml Mon Dec 13 18:26:19 2010
@@ -19,8 +19,8 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <groupId>org.apache.aries</groupId>
-        <artifactId>java5-parent</artifactId>
+        <groupId>org.apache.aries.proxy</groupId>
+        <artifactId>proxy</artifactId>
         <version>0.3-incubating-SNAPSHOT</version>
     </parent>
 
@@ -39,18 +39,36 @@
     </scm>
 
     <properties>
-        <aries.osgi.export.pkg>
-        </aries.osgi.export.pkg>
+        <aries.osgi.export.pkg/>
+        <aries.osgi.activator>
+            org.apache.aries.proxy.impl.ProxyManagerActivator
+        </aries.osgi.activator>
         <aries.osgi.import.pkg>
+            org.objectweb.asm;resolution:=optional,
+            org.objectweb.asm.commons;resolution:=optional,
             *
         </aries.osgi.import.pkg>
         <aries.osgi.private.pkg>
-            org.apache.aries.proxy.impl
+            org.apache.aries.proxy.impl*
         </aries.osgi.private.pkg>
     </properties>
 
     <dependencies>
         <dependency>
+            <groupId>asm</groupId>
+            <artifactId>asm-all</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
             <scope>provided</scope>
@@ -77,12 +95,17 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-        	<groupId>org.apache.aries</groupId>
+        	<groupId>org.apache.aries.proxy</groupId>
         	<artifactId>org.apache.aries.proxy.api</artifactId>
         	<version>0.3-incubating-SNAPSHOT</version>
         	<type>bundle</type>
         	<scope>compile</scope>
         </dependency>
+        <dependency>
+        	<groupId>org.apache.aries</groupId>
+        	<artifactId>org.apache.aries.util</artifactId>
+        	<scope>compile</scope>
+        </dependency>
     </dependencies>
 
 </project>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/quiesce/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/quiesce/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/quiesce/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/quiesce/pom.xml Mon Dec 13 18:26:19 2010
@@ -20,6 +20,7 @@
         <groupId>org.apache.aries</groupId>
         <artifactId>java5-parent</artifactId>
         <version>0.3-incubating-SNAPSHOT</version>
+        <relativePath>../parent/default-parent/java5-parent/pom.xml</relativePath>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-assembly/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-assembly/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-assembly/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-assembly/pom.xml Mon Dec 13 18:26:19 2010
@@ -169,6 +169,21 @@
 			<artifactId>cxf-dosgi-ri-singlebundle-distribution</artifactId>
 			<version>1.2</version>
 		</dependency>
+		<dependency>
+			<groupId>org.apache.aries.samples.dgoat.cxf-api</groupId>
+			<artifactId>cxf-api</artifactId>
+			<version>0.3-incubating-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.aries.samples.dgoat.cxf-client</groupId>
+			<artifactId>cxf-client</artifactId>
+			<version>0.3-incubating-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.aries.samples.dgoat.cxf-server</groupId>
+			<artifactId>cxf-server</artifactId>
+			<version>0.3-incubating-SNAPSHOT</version>
+		</dependency>
 		
 		<!-- Required for Tuscany -->
 		<dependency>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-assembly/src/main/filtered-resources/clientConfigCXF/config.ini
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-assembly/src/main/filtered-resources/clientConfigCXF/config.ini?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-assembly/src/main/filtered-resources/clientConfigCXF/config.ini (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-assembly/src/main/filtered-resources/clientConfigCXF/config.ini Mon Dec 13 18:26:19 2010
@@ -23,11 +23,8 @@ osgi.bundles=\
  pax-web-jsp-0.7.2.jar@start,\
  cxf-dosgi-ri-singlebundle-distribution-1.2.jar@start, \
  org.apache.aries.blueprint-0.3-incubating-SNAPSHOT.jar@start,\
- org.apache.aries.samples.dgoat.api-0.3-incubating-SNAPSHOT@start,\
+ org.apache.aries.samples.dgoat.api-0.3-incubating-SNAPSHOT.jar@start,\
  org.apache.aries.samples.dgoat.web-0.3-incubating-SNAPSHOT.jar@start,\
- org.apache.aries.samples.dgoat.dummy-0.3-incubating-SNAPSHOT.jar@start,\
- org.apache.aries.samples.dgoat.dummy2-0.3-incubating-SNAPSHOT.jar@start,\
- org.apache.aries.samples.dgoat.info.enhancer-0.3-incubating-SNAPSHOT.jar@start
 eclipse.ignoreApp=true
 org.osgi.service.http.port=6666
 org.ops4j.pax.logging.DefaultServiceLog.level=DEBUG

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-bundlecontext-modelprovider/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-bundlecontext-modelprovider/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-bundlecontext-modelprovider/src/main/resources/OSGI-INF/blueprint/blueprint.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-bundlecontext-modelprovider/src/main/resources/OSGI-INF/blueprint/blueprint.xml Mon Dec 13 18:26:19 2010
@@ -27,9 +27,8 @@
 <!--  	  <entry key="service.exported.configs" value="org.osgi.sca" />
   	  <entry key="org.osgi.sca.bindings" value="bundleCtxProvider" />
   	  -->
-		<!-- CXF entries -->
 		<entry key="service.exported.configs" value="org.apache.cxf.ws" />
-		<entry key="org.apache.cxf.ws.address" value="http://localhost:9090/bundlectx" />
+		<entry key="org.apache.cxf.ws.address" value="http://localhost:9191/bundlectx" />
   	</service-properties>
   </service>
 </blueprint>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-info-enhancer/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-info-enhancer/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-info-enhancer/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-info-enhancer/pom.xml Mon Dec 13 18:26:19 2010
@@ -32,6 +32,17 @@
 			<groupId>${pom.groupId}</groupId>
 			<artifactId>org.apache.aries.samples.dgoat.web</artifactId>
 		</dependency>
+		<dependency>
+		            <groupId>org.apache.felix</groupId>
+		            <artifactId>org.apache.felix.framework</artifactId>
+		            <version>3.0.3</version>
+		            <exclusions>
+		                    <exclusion>
+		                          <groupId>org.apache.felix</groupId>
+		                          <artifactId>org.osgi.foundation</artifactId>
+		                    </exclusion>
+		            </exclusions>
+	 </dependency>
 	</dependencies>
 
 
@@ -50,9 +61,10 @@
 				<configuration>
 					<instructions>
 						<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
-						<Remote-Service>OSGI-INF/remote-service</Remote-Service>
+						<Remote-Service>OSGI-INF/remote-service/remote-services.xml</Remote-Service>
 						<Private-Package>org.apache.aries.samples.goat.enhancer.*</Private-Package> 
 						<Export-Package>!org.apache.aries.samples.goat.enhancer.*</Export-Package> 
+						<DynamicImport-Package>org.apache.cxf.dosgi.dsw.qos,org.apache.cxf</DynamicImport-Package>
 					</instructions>
 				</configuration>
 			</plugin>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/dgoat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java Mon Dec 13 18:26:19 2010
@@ -42,16 +42,22 @@ import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
 
 public class ServerSideClass {
 
 	private String modelInfoServiceHint = "";
 
 	private ModelInfoService ModelInfoService = null;
+	
+	private ModelInfoService blah;
 
 	private Map<ModelInfoService, ComponentInfoProvider.ComponentInfoListener> clisteners = new HashMap<ModelInfoService, ComponentInfoProvider.ComponentInfoListener>();
 	private Map<ModelInfoService, RelationshipInfoProvider.RelationshipInfoListener> rlisteners = new HashMap<ModelInfoService, RelationshipInfoProvider.RelationshipInfoListener>();
 
+	public ServerSideClass(ModelInfoService blah) {
+		this.blah = blah;
+	}
 	private class ComponentInfoListenerImpl implements
 			ComponentInfoProvider.ComponentInfoListener {
 		String server;
@@ -155,6 +161,7 @@ public class ServerSideClass {
 								ModelInfoService.class.getName(),
 								"(displayName=" + this.modelInfoServiceHint
 										+ ")");
+						
 						if (sr != null) {
 							System.err.println("Getting bcip");
 							this.ModelInfoService = (ModelInfoService) b_ctx
@@ -263,6 +270,11 @@ public class ServerSideClass {
 
 						String name = (String.valueOf(sr
 								.getProperty("displayName")));
+						
+						Long bid = sr.getBundle().getBundleId();
+						
+						System.err.println("ZZZZ Name: " + name);
+						System.err.println("ZZZZ Bundle Id: " + bid);
 
 						result.add(name);
 					}

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/samples-sandbox/dgoat/pom.xml Mon Dec 13 18:26:19 2010
@@ -66,6 +66,21 @@
                 <artifactId>org.apache.aries.samples.dgoat.info.enhancer</artifactId>
                 <version>${version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.apache.aries.samples.dgoat.cxf-api</groupId>
+                <artifactId>cxf-api</artifactId>
+                <version>${version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.samples.dgoat.cxf-client</groupId>
+                <artifactId>cxf-client</artifactId>
+                <version>${version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.samples.dgoat.cxf-server</groupId>
+                <artifactId>cxf-server</artifactId>
+                <version>${version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 
@@ -79,6 +94,9 @@
         <module>dgoat-eba</module> 
         <module>dgoat-bundlecontext-modelprovider</module>
         <module>dgoat-info-enhancer</module>
+        <module>dgoat-cxf-sample-api</module>
+        <module>dgoat-cxf-sample-cli</module>
+        <module>dgoat-cxf-sample-server</module>
     </modules>
 
 </project>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/samples/blog/blog-itests/src/test/java/org/apache/aries/samples/blog/itests/JdbcBlogSampleWithEbaTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/samples/blog/blog-itests/src/test/java/org/apache/aries/samples/blog/itests/JdbcBlogSampleWithEbaTest.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/samples/blog/blog-itests/src/test/java/org/apache/aries/samples/blog/itests/JdbcBlogSampleWithEbaTest.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/samples/blog/blog-itests/src/test/java/org/apache/aries/samples/blog/itests/JdbcBlogSampleWithEbaTest.java Mon Dec 13 18:26:19 2010
@@ -137,6 +137,7 @@ public class JdbcBlogSampleWithEbaTest e
                 mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint" ),
                 mavenBundle("org.apache.aries", "org.apache.aries.util" ),
                 mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi" ),
+                mavenBundle("org.apache.felix", "org.apache.felix.fileinstall" ),
                 mavenBundle("org.apache.aries.application", "org.apache.aries.application.install" ),
                 mavenBundle("org.apache.aries.application", "org.apache.aries.application.api" ),
                 mavenBundle("org.apache.aries.application", "org.apache.aries.application.management" ),
@@ -149,7 +150,6 @@ public class JdbcBlogSampleWithEbaTest e
                 mavenBundle("org.apache.aries.application", "org.apache.aries.application.resolver.obr"),
                 mavenBundle("org.apache.aries.application", "org.apache.aries.application.modeller"),
                 mavenBundle("org.apache.aries.application", "org.apache.aries.application.deployment.management"),
-                mavenBundle("org.apache.felix", "org.apache.felix.fileinstall" ),
                 mavenBundle("org.apache.aries.jpa", "org.apache.aries.jpa.api" ),
                 mavenBundle("org.apache.aries.jpa", "org.apache.aries.jpa.container" ),
                 mavenBundle("org.apache.aries.jpa", "org.apache.aries.jpa.blueprint.aries" ),

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/samples/blog/blog-itests/src/test/java/org/apache/aries/samples/blog/itests/JpaBlogSampleWithEbaTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/samples/blog/blog-itests/src/test/java/org/apache/aries/samples/blog/itests/JpaBlogSampleWithEbaTest.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/samples/blog/blog-itests/src/test/java/org/apache/aries/samples/blog/itests/JpaBlogSampleWithEbaTest.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/samples/blog/blog-itests/src/test/java/org/apache/aries/samples/blog/itests/JpaBlogSampleWithEbaTest.java Mon Dec 13 18:26:19 2010
@@ -156,6 +156,7 @@ bootDelegationPackages("javax.transactio
             mavenBundle("org.apache.aries", "org.apache.aries.util" ),
             mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi" ),
             mavenBundle("org.apache.felix", "org.apache.felix.bundlerepository"),
+            mavenBundle("org.apache.felix", "org.apache.felix.fileinstall" ),
             mavenBundle("org.apache.aries.application", "org.apache.aries.application.resolver.obr"),
             mavenBundle("org.apache.aries.application", "org.apache.aries.application.install" ),
             mavenBundle("org.apache.aries.application", "org.apache.aries.application.api" ),

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/samples/blog/blog-itests/src/test/java/org/apache/aries/samples/blog/itests/QuiesceBlogSampleWithEbaTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/samples/blog/blog-itests/src/test/java/org/apache/aries/samples/blog/itests/QuiesceBlogSampleWithEbaTest.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/samples/blog/blog-itests/src/test/java/org/apache/aries/samples/blog/itests/QuiesceBlogSampleWithEbaTest.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/samples/blog/blog-itests/src/test/java/org/apache/aries/samples/blog/itests/QuiesceBlogSampleWithEbaTest.java Mon Dec 13 18:26:19 2010
@@ -218,6 +218,7 @@ bootDelegationPackages("javax.transactio
             mavenBundle("org.apache.aries", "org.apache.aries.util" ),
             mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi" ),
             mavenBundle("org.apache.felix", "org.apache.felix.bundlerepository"),
+            mavenBundle("org.apache.felix", "org.apache.felix.fileinstall" ),
             mavenBundle("org.apache.aries.application", "org.apache.aries.application.resolver.obr"),
             mavenBundle("org.apache.aries.application", "org.apache.aries.application.install" ),
             mavenBundle("org.apache.aries.application", "org.apache.aries.application.api" ),

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/samples/goat/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1,5 @@
+target
+.classpath
+.project
+.settings
+

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/samples/goat/goat-api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1,5 @@
+target
+.classpath
+.project
+.settings
+

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/samples/goat/goat-assembly/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1,5 @@
+target
+.classpath
+.project
+.settings
+

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/samples/goat/goat-bundlecontext-modelprovider/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1,5 @@
+target
+.classpath
+.project
+.settings
+

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/samples/goat/goat-dummy-provider/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1,5 @@
+target
+.classpath
+.project
+.settings
+

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/samples/goat/goat-dummy2-provider/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1,5 @@
+target
+.classpath
+.project
+.settings
+

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/samples/goat/goat-eba/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1,5 @@
+target
+.classpath
+.project
+.settings
+

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/samples/goat/goat-info-enhancer/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1,5 @@
+target
+.classpath
+.project
+.settings
+

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/samples/goat/goat-web/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1,5 @@
+target
+.classpath
+.project
+.settings
+

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/samples/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/samples/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/samples/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/samples/pom.xml Mon Dec 13 18:26:19 2010
@@ -21,6 +21,7 @@
         <groupId>org.apache.aries</groupId>
         <artifactId>java5-parent</artifactId>
         <version>0.3-incubating-SNAPSHOT</version>
+        <relativePath>../parent/default-parent/java5-parent/pom.xml</relativePath>
     </parent>
     
     <modelVersion>4.0.0</modelVersion>

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/spi-fly/contrib/pilot_using_weavinghook/Extender/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1 @@
+.settings

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/spi-fly/contrib/pilot_using_weavinghook/MyServiceImpl/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1,2 @@
+.settings
+bin

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/spi-fly/contrib/pilot_using_weavinghook/MyServiceSPI/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1 @@
+bin

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/spi-fly/contrib/pilot_using_weavinghook/MyTestBundle/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1 @@
+.settings

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/spi-fly/contrib/pilot_using_weavinghook/MyTestBundleModifications/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1 @@
+.settings

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/spi-fly/contrib/pilot_using_weavinghook/ServiceLoaderAPI/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1 @@
+bin

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/spi-fly/contrib/pilot_using_weavinghook/SpiFly/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 13 18:26:19 2010
@@ -0,0 +1 @@
+.settings

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/spi-fly/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/spi-fly/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/spi-fly/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/spi-fly/pom.xml Mon Dec 13 18:26:19 2010
@@ -26,6 +26,7 @@
         <groupId>org.apache.aries</groupId>
         <artifactId>java5-parent</artifactId>
         <version>0.3-incubating-SNAPSHOT</version>
+        <relativePath>../parent/default-parent/java5-parent/pom.xml</relativePath>
     </parent>
 
     <groupId>org.apache.aries.spifly</groupId>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/pom.xml?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/pom.xml (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/pom.xml Mon Dec 13 18:26:19 2010
@@ -51,6 +51,16 @@
                 <version>${version}</version>
             </dependency>
             <dependency>
+                <groupId>org.apache.aries.subsystem</groupId>
+                <artifactId>org.apache.aries.subsystem.scope.api</artifactId>
+                <version>${version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.subsystem</groupId>
+                <artifactId>org.apache.aries.subsystem.scope.impl</artifactId>
+                <version>${version}</version>
+            </dependency>
+            <dependency>
                 <groupId>org.apache.aries.testsupport</groupId>
                 <artifactId>org.apache.aries.testsupport.unit</artifactId>
                 <version>${version}</version>
@@ -121,13 +131,16 @@
 	    </dependencies>
 	</dependencyManagement>
 
-	<modules>
+    <modules>
         <module>subsystem-api</module>
         <module>subsystem-core</module>
+        <module>subsystem-scope-api</module>
+        <module>subsystem-scope-impl</module>
         <module>subsystem-obr</module>
         <module>subsystem-executor</module>
         <module>subsystem-install</module>
+        <module>subsystem-example</module>
         <module>subsystem-itests</module>
-	</modules>
+    </modules>
 
 </project>

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/readme.txt
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/readme.txt?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/readme.txt (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/readme.txt Mon Dec 13 18:26:19 2010
@@ -1,9 +1,10 @@
-The Subsystems subproject uses RFC 138 which has not been published by the OSGi alliance yet.
-The binaries are available from the OSGi repo if you are an OSGi alliance member.
+The Subsystems subproject uses RFC 138(Framework hooks).
 You need to download the implementation jar at:
-  https://www.osgi.org/members/svn/build/trunk/licensed/repo/org.eclipse.osgi.v43prototype
+    http://download.eclipse.org/equinox/
 You need to copy it in your local m2 repository:
-  ~/.m2/repository/org/eclipse/osgi/v43prototype-3.6.0.201003231329/osgi-v43prototype-3.6.0.201003231329.jar 
+  ~/.m2/repository/org/eclipse/osgi/3.7.0.v20100910/osgi-3.7.0.v20100910.jar
+
+I tested using the 3.7M2 stable builds.
 
 Also, you need to run the following command to index your local m2 repo to ~/.m2/repository/repository.xml file. 
 

Propchange: incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/
            ('svn:ignore' removed)

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/src/main/java/org/apache/aries/subsystem/Subsystem.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/src/main/java/org/apache/aries/subsystem/Subsystem.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/src/main/java/org/apache/aries/subsystem/Subsystem.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/src/main/java/org/apache/aries/subsystem/Subsystem.java Mon Dec 13 18:26:19 2010
@@ -193,6 +193,16 @@ public interface Subsystem {
      *
      * @return the content of this subsystem.
      */
-    Collection<Bundle> getConstituents();
+    Collection<Bundle> getBundles();
 
+    //long getParentId();
+    
+    public void updateHeaders(Map<String, String> headers);
+    
+    /**
+     * return the subsystem managed by the subsystem
+     * @return
+     */
+    Collection<Subsystem> getChildrenSubsystems();
+    
 }

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/src/main/java/org/apache/aries/subsystem/SubsystemAdmin.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/src/main/java/org/apache/aries/subsystem/SubsystemAdmin.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/src/main/java/org/apache/aries/subsystem/SubsystemAdmin.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/src/main/java/org/apache/aries/subsystem/SubsystemAdmin.java Mon Dec 13 18:26:19 2010
@@ -15,7 +15,6 @@ package org.apache.aries.subsystem;
 
 import java.io.InputStream;
 import java.util.Collection;
-import java.util.concurrent.Future;
 
 import org.osgi.framework.Version;
 
@@ -66,22 +65,16 @@ public interface SubsystemAdmin {
      */
     Subsystem getSubsystem(String symbolicName, Version version);
 
-	/**
-	 * Install a new subsystem from the specified location identifier.
-	 * 
-	 * This method performs the same function as calling
-	 * {@link #install(String, InputStream)} with the specified location
-	 * identifier and a null InputStream.
-	 * 
-	 * @param location
-	 * @return a <code>Future</code> for the subsystem to be installed.
-     * @throws SecurityException
-     *             If the caller does not have the appropriate
-     *             AdminPermission[installed subsystem,LIFECYCLE], and the Java
-     *             Runtime Environment supports permissions.
-     *             
+    /**
+     * Install a new subsystem from the specified location identifier.
+     * 
+     * This method performs the same function as calling {@link #install(String, InputStream)} with the specified 
+     * location identifier and a null InputStream.
+     *
+     * @param location
+     * @return
      */
-    Future<Subsystem> install(String location);
+    Subsystem install(String location) throws SubsystemException;
 
     /**
      * Install a new subsystem from the specified <code>InputStream</code>
@@ -100,32 +93,22 @@ public interface SubsystemAdmin {
      * 
      * The following steps are required to install a subsystem:
      * 
-     * A <code>Future</code> is returned. If there is a subsystem containing the
-     * same location identifier then the Subsystem will be immediately available
-     * from the Future. If there is already an install in progress for a
-     * subsystem with the same location identifier, then the Future returned is
-     * the same as the Future returned for the first install and a new install
-     * is not started. If this is a new install, then a new <code>Future</code>
-     * is returned with the installation process started.
-     * 
-     * A <code>Future</code> returned performs the following installation steps:
-     * 
      * <ol>
-     * <li>The subsystem's content is read from the input stream. If this fails
-     * a <code>SubsystemException</code> is set on the <code>Future</code>.</li>
-     * <li>The empty subsystem object is created and assigned a unique id which
-     * is higher than any previous bundle of subsystem identifier.</li>
-     * <li>The subsystem's associated resources are located.</li>
-     * <li>The subsystem's state is set to <code>INSTALLED</code></li>
-     * <li>The subsystem event of type <code>INSTALLED</code> is fired.</li>
-     * <li>Installation of subsystem content is started.</li>
-     * <li>The subsystem object for the newly installed subsystem is made
-     * available from the <code>Future</code>.</li>
+     * <li> If a subsystem containing the same location identifier is already
+     *    installed, the <code>Subsystem</code> object for that subsystem is
+     *    returned. </li>
+     * <li> The subsystem's content is read from the input stream. If
+     *    this fails, a <code>SubsystemException</code> is thrown.</li> 
+     * <li> The empty subsystem object is created and assigned a unique id 
+     *    which is higher than any previous bundle of subsystem identifier.</li> 
+     * <li> The subsystem's associated resources are located. </li>
+     * <li> The subsystem's state is set to <code>INSTALLED</code> </li>
+     * <li> The subsystem event of type <code>INSTALLED</code> is fired.</li> 
+     * <li> Installation of subsystem content is started. </li>
+     * <li> The subsystem object for the newly installed subsystem is returned.</li>
      * </ol>
      * 
-     * TODO: discuss the above steps. Should we change to have the individual
-     * bundle installs also happen synchronously? At the moment you can get the
-     * Subsystem back and it's empty. This was a pain with the itests.
+     * TODO: discuss the above steps.
      * 
      * @param location
      *            The location identifier of the subsystem to be installed.
@@ -133,26 +116,27 @@ public interface SubsystemAdmin {
      *            The <code>InputStream</code> from where the subsystem is to be
      *            installed or <code>null</code> if the location is to be used
      *            to create the <code>InputStream</code>.
-     * @return a <code>Future</code> for the subsystem to be installed.
+     * @return the installed subsystem.
+     * @throws SubsystemException
+     *             If the <code>InputStream</code> cannot be read or the
+     *             installation fails. This exception is not thrown in the event
+     *             of the subsystems contents failing to install.
      * @throws SecurityException
      *             If the caller does not have the appropriate
      *             AdminPermission[installed subsystem,LIFECYCLE], and the Java
      *             Runtime Environment supports permissions.
      */
-    Future<Subsystem> install(String location, InputStream content);
+    Subsystem install(String location, InputStream content) throws SubsystemException;
 
     /**
      * Update the given subsystem.
+     *
+     * This method performs the same function as calling {@link #update(Subsystem, InputStream)} 
+     * with the specified subsystem and a <code>null</code> <code>InputStream</code>.
      * 
-     * This method performs the same function as calling
-     * {@link #update(Subsystem, InputStream)} with the specified subsystem and
-     * a <code>null</code> <code>InputStream</code>.
-     * 
-     * @param subsystem
-     *            The subsystem to be updated.
-     * @return a <code>Future</code> for the subsystem being updated.
+     * @param subsystem The subsystem to be updated.
      */
-    Future<Subsystem> update(Subsystem subsystem) throws SubsystemException;
+    void update(Subsystem subsystem) throws SubsystemException;
 
     /**
      * Update the given subsystem from an <code>InputStream</code>.
@@ -170,7 +154,9 @@ public interface SubsystemAdmin {
      *            subsystem or <code>null</code> if the
      *            {@link SubsystemConstants#SUBSYSTEM_UPDATELOCATION
      *            Subsystem-UpdateLocation} or original location are to be used.
-     * @return a <code>Future</code> for the subsystem being updated.
+     * @throws SubsystemException
+     *             If the <code>InputStream</code> cannot be read of the update
+     *             fails.
      * @throws IllegalStateException
      *             If the subsystem is in the <code>UNINSTALLED</code> state.
      * @throws SecurityException
@@ -179,7 +165,7 @@ public interface SubsystemAdmin {
      *             subsystem and the updated subsystem and the Java Runtime
      *             Environment supports permissions.
      */
-    Future<Subsystem> update(Subsystem subsystem, InputStream content) throws SubsystemException;
+    void update(Subsystem subsystem, InputStream content) throws SubsystemException;
 
     /**
      * Uninstall the given subsystem.
@@ -220,5 +206,33 @@ public interface SubsystemAdmin {
      */
   void uninstall(Subsystem subsystem) throws SubsystemException;
 
+    /**
+     * Cancel the current operation.
+     * 
+     * The installing thread must throw a <code>SubsystemException</code> if the
+     * operation has actually been cancelled and rolled back before completion.
+     * 
+     * @return <code>true</code> if an operation was ongoing and requested to be
+     *         cancelled, <code>false</code> if there was no ongoing operation.
+     * 
+     *         TODO: discuss this. Why is it necessary?
+     */
+    boolean cancel();
+
+    /**
+     * Gets the corresponding subsystem of the subsystemAdmin service.
+     * 
+     * @return
+     */
+    Subsystem getSubsystem();
+
+    /**
+     * Gets the parent subsystem of the subsystem that is managed by the
+     * subsystem admin.
+     * 
+     * @return
+     */
+    Subsystem getParentSubsystem();
+
 
 }
\ No newline at end of file

Modified: incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/src/main/java/org/apache/aries/subsystem/SubsystemEvent.java
URL: http://svn.apache.org/viewvc/incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/src/main/java/org/apache/aries/subsystem/SubsystemEvent.java?rev=1045274&r1=1045273&r2=1045274&view=diff
==============================================================================
--- incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/src/main/java/org/apache/aries/subsystem/SubsystemEvent.java (original)
+++ incubator/aries/sandbox/jbohn/interceptor-proto/subsystem/subsystem-api/src/main/java/org/apache/aries/subsystem/SubsystemEvent.java Mon Dec 13 18:26:19 2010
@@ -14,7 +14,6 @@
 package org.apache.aries.subsystem;
 
 import java.io.InputStream;
-import java.net.URL;
 
 /**
  * Event sent to listeners when an operation has been performed on a subsystem.
@@ -66,25 +65,13 @@ public class SubsystemEvent {
         /**
          * Event type used to indicate a subsystem is stopping.
          */
-        STOPPING,
-        
-        /**
-         * Event type used to indicate that the operation failed (e.g. an exception was thrown during installation).
-         */
-        FAILED,
-        
-        /**
-         * Event type used to indicate that the operations was cancelled (e.g. an install was cancelled).
-         */
-        CANCELLED
+        STOPPING
     }
     private final Type type;
 
     private final long timestamp;
 
     private final Subsystem subsystem;
-    
-    private final String location;
 
     /**
      * Constructs a new subsystem event.
@@ -97,21 +84,6 @@ public class SubsystemEvent {
         this.type = type;
         this.timestamp = timestamp;
         this.subsystem = subsystem;
-        this.location = subsystem.getLocation();
-    }
-
-    /**
-     * Constructs a new subsystem event.
-     * 
-     * @param type The type of the event.  For example, INSTALLED.  See {@link SubsystemEvent.Type} for the list of event types.
-     * @param timestamp The timestamp for the event.
-     * @param location The location of the subsystem for failure/cancellation cases.
-     */
-    public SubsystemEvent(Type type, long timestamp, String location) {
-        this.type = type;
-        this.timestamp = timestamp;
-        this.location = location;
-        this.subsystem = null;
     }
 
     /**
@@ -140,13 +112,4 @@ public class SubsystemEvent {
         return subsystem;
     }
 
-    /**
-     * Gets the location for the subsystem.
-     * 
-     * @return the location of the subsystem.
-     */
-    public String getLocation() {
-        return location;
-    }
-
 }



Mime
View raw message