[jboss-cvs] JBossAS SVN: r89528 - in projects/jboss-osgi/trunk: blueprint/impl/src/main/java/org/jboss/osgi/blueprint/extender and 9 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri May 29 08:37:36 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-05-29 08:37:36 -0400 (Fri, 29 May 2009)
New Revision: 89528

Added:
   projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/BlueprintService.java
   projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/RemoteLogService.java
   projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogServiceActivator.java
   projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/HuskyActivator.java
Removed:
   projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/ServiceActivator.java
   projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/Activator.java
Modified:
   projects/jboss-osgi/trunk/blueprint/impl/pom.xml
   projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintActivator.java
   projects/jboss-osgi/trunk/bundles/remotelog/pom.xml
   projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogListener.java
   projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogReaderServiceImpl.java
   projects/jboss-osgi/trunk/husky/harness/pom.xml
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiBootstrap.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/BlueprintCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/Capability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/ConfigAdminCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/HttpCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/HuskyCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/JAXBCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/JMXCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/JNDICapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/MicrocontainerCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/RemoteLogCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/XMLBindingCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/XMLParserCapability.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
Log:
Add capability dependent on whether it is already registered

Modified: projects/jboss-osgi/trunk/blueprint/impl/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/pom.xml	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/blueprint/impl/pom.xml	2009-05-29 12:37:36 UTC (rev 89528)
@@ -64,8 +64,9 @@
             </Export-Package>
             <Import-Package>
               org.apache.xerces.dom,
-              org.jboss.osgi.spi,
+              org.jboss.osgi.spi;version=1.0,
               org.jboss.osgi.common.log;version=1.0,
+              org.jboss.osgi.common.service;version=1.0,
               org.jboss.xb.*,
               org.osgi.framework, 
               org.osgi.service.log, 

Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintActivator.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintActivator.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintActivator.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -23,6 +23,7 @@
 
 //$Id$
 
+import org.jboss.osgi.common.service.BlueprintService;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleListener;
@@ -40,6 +41,10 @@
    
    public void start(BundleContext context) throws Exception
    {
+      // Register the marker service
+      BlueprintService service = new BlueprintService(){};
+      context.registerService(BlueprintService.class.getName(), service, null);
+      
       extender = new BlueprintExtender(context);
       context.addBundleListener(extender);
    }

Added: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/BlueprintService.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/BlueprintService.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/BlueprintService.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.common.service;
+
+//$Id$
+
+/**
+ * A marker service that is registered by jboss-osgi-blueprint
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 29-May-2009
+ */
+public interface BlueprintService
+{
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/BlueprintService.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/RemoteLogService.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/RemoteLogService.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/RemoteLogService.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.common.service;
+
+//$Id$
+
+/**
+ * A marker service that is registered by jboss-osgi-remotelog
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 29-May-2009
+ */
+public interface RemoteLogService
+{
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/RemoteLogService.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: projects/jboss-osgi/trunk/bundles/remotelog/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/remotelog/pom.xml	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/bundles/remotelog/pom.xml	2009-05-29 12:37:36 UTC (rev 89528)
@@ -43,6 +43,13 @@
       <scope>provided</scope>
     </dependency>
     
+    <!-- Bundle Dependencies -->
+    <dependency>
+      <groupId>org.jboss.osgi.bundles</groupId>
+      <artifactId>jboss-osgi-common</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    
     <!-- Remoting Dependencies -->
     <dependency>
       <groupId>org.jboss.remoting</groupId>
@@ -81,7 +88,7 @@
         <configuration>
           <instructions>
             <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
-            <Bundle-Activator>org.jboss.osgi.service.remotelog.internal.ServiceActivator</Bundle-Activator>
+            <Bundle-Activator>org.jboss.osgi.service.remotelog.internal.RemoteLogServiceActivator</Bundle-Activator>
             <Export-Package>org.jboss.osgi.service.remotelog;version=${version}</Export-Package>
             <Import-Package>
                org.osgi.framework,
@@ -99,8 +106,9 @@
                org.apache.log4j, 
                org.jboss.logging, 
                org.jboss.mx.util;resolution:=optional,
-               org.jboss.osgi.spi, 
-               org.jboss.osgi.spi.logging, 
+               org.jboss.osgi.common.service;version=1.0,
+               org.jboss.osgi.spi;version=1.0, 
+               org.jboss.osgi.spi.logging;version=1.0, 
                org.jboss.remoting;resolution:=optional, 
                org.jboss.remoting.*;resolution:=optional, 
                org.jboss.util.*, 

Modified: projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogListener.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogListener.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogListener.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -25,7 +25,7 @@
 
 import java.util.Properties;
 
-import org.jboss.osgi.service.remotelog.internal.ServiceActivator;
+import org.jboss.osgi.service.remotelog.internal.RemoteLogServiceActivator;
 import org.jboss.osgi.service.remotelog.internal.RemoteLogEntry;
 import org.jboss.remoting.Client;
 import org.jboss.remoting.InvokerLocator;
@@ -54,8 +54,8 @@
    public RemoteLogListener(BundleContext context, Properties props)
    {
       this.context = context;
-      this.host = props.getProperty(ServiceActivator.REMOTE_LOG_HOST);
-      this.port = new Integer(props.getProperty(ServiceActivator.REMOTE_LOG_PORT));
+      this.host = props.getProperty(RemoteLogServiceActivator.REMOTE_LOG_HOST);
+      this.port = new Integer(props.getProperty(RemoteLogServiceActivator.REMOTE_LOG_PORT));
       
       // Get the remoting client 
       try

Modified: projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogReaderServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogReaderServiceImpl.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogReaderServiceImpl.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -58,8 +58,8 @@
 
    public RemoteLogReaderServiceImpl(BundleContext context, Properties props)
    {
-      this.host = props.getProperty(ServiceActivator.REMOTE_LOG_HOST);
-      this.port = new Integer(props.getProperty(ServiceActivator.REMOTE_LOG_PORT));
+      this.host = props.getProperty(RemoteLogServiceActivator.REMOTE_LOG_HOST);
+      this.port = new Integer(props.getProperty(RemoteLogServiceActivator.REMOTE_LOG_PORT));
    }
 
    public void addLogListener(LogListener listener)

Copied: projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogServiceActivator.java (from rev 89516, projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogServiceActivator.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogServiceActivator.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -0,0 +1,113 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.service.remotelog.internal;
+
+//$Id$
+
+import java.util.Properties;
+
+import org.jboss.osgi.common.service.RemoteLogService;
+import org.jboss.osgi.service.remotelog.RemoteLogListener;
+import org.jboss.osgi.spi.logging.RemoteLogReaderService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * [TODO]
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class RemoteLogServiceActivator implements BundleActivator
+{
+   public static final String REMOTE_LOG_SENDER = "org.jboss.osgi.service.remote.log.sender";
+   public static final String REMOTE_LOG_READER = "org.jboss.osgi.service.remote.log.reader";
+   public static final String REMOTE_LOG_HOST = "org.jboss.osgi.service.remote.log.host";
+   public static final String REMOTE_LOG_PORT = "org.jboss.osgi.service.remote.log.port";
+
+   private Boolean isReader = Boolean.FALSE;
+   private Boolean isSender = Boolean.FALSE;
+   private RemoteLogReaderServiceImpl readerService;
+   private RemoteLogListener remoteSender;
+
+   public void start(BundleContext context)
+   {
+      String readerProp = context.getProperty(REMOTE_LOG_READER);
+      String senderProp = context.getProperty(REMOTE_LOG_SENDER);
+      String hostProp = context.getProperty(REMOTE_LOG_HOST);
+      String portProp = context.getProperty(REMOTE_LOG_PORT);
+
+      if (readerProp != null)
+         isReader = Boolean.valueOf(readerProp);
+
+      if (senderProp != null)
+         isSender = Boolean.valueOf(senderProp);
+
+      String host = hostProp != null ? hostProp : "localhost";
+      String port = portProp != null ? portProp : "5400";
+
+      Properties props = new Properties();
+      props.put(REMOTE_LOG_HOST, host);
+      props.put(REMOTE_LOG_PORT, port);
+
+      RemoteLogService service = new RemoteLogService(){};
+      context.registerService(RemoteLogService.class.getName(), service, props);
+
+      ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+      try
+      {
+         Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+
+         if (isReader == true)
+         {
+            readerService = new RemoteLogReaderServiceImpl(context, props);
+            context.registerService(RemoteLogReaderService.class.getName(), readerService, props);
+            readerService.start();
+         }
+
+         if (isSender == true)
+         {
+            remoteSender = new RemoteLogListener(context, props);
+            remoteSender.start();
+         }
+      }
+      finally
+      {
+         Thread.currentThread().setContextClassLoader(ctxLoader);
+      }
+   }
+
+   public void stop(BundleContext context) throws Exception
+   {
+      if (isReader == true)
+      {
+         readerService.stop();
+         readerService = null;
+      }
+
+      if (isSender == true)
+      {
+         remoteSender.stop();
+         remoteSender = null;
+      }
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/ServiceActivator.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/bundles/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/ServiceActivator.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -1,109 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.service.remotelog.internal;
-
-//$Id$
-
-import java.util.Properties;
-
-import org.jboss.osgi.service.remotelog.RemoteLogListener;
-import org.jboss.osgi.spi.logging.RemoteLogReaderService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * [TODO]
- * 
- * @author thomas.diesler at jboss.com
- * @since 23-Jan-2009
- */
-public class ServiceActivator implements BundleActivator
-{
-   public static final String REMOTE_LOG_SENDER = "org.jboss.osgi.service.remote.log.sender";
-   public static final String REMOTE_LOG_READER = "org.jboss.osgi.service.remote.log.reader";
-   public static final String REMOTE_LOG_HOST = "org.jboss.osgi.service.remote.log.host";
-   public static final String REMOTE_LOG_PORT = "org.jboss.osgi.service.remote.log.port";
-   
-   private Boolean isReader = Boolean.FALSE;
-   private Boolean isSender = Boolean.FALSE;
-   private RemoteLogReaderServiceImpl readerService;
-   private RemoteLogListener remoteSender;
-   
-   public void start(BundleContext context)
-   {
-      String readerProp = context.getProperty(REMOTE_LOG_READER);
-      String senderProp = context.getProperty(REMOTE_LOG_SENDER);
-      String hostProp = context.getProperty(REMOTE_LOG_HOST);
-      String portProp = context.getProperty(REMOTE_LOG_PORT);
-      
-      if (readerProp != null)
-         isReader = Boolean.valueOf(readerProp);
-      
-      if (senderProp != null)
-         isSender = Boolean.valueOf(senderProp);
-      
-      String host = hostProp != null ? hostProp : "localhost";
-      String port = portProp != null ? portProp : "5400";
-      
-      Properties props = new Properties();
-      props.put(REMOTE_LOG_HOST, host);
-      props.put(REMOTE_LOG_PORT, port);
-      
-      ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
-      try
-      {
-         Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
-         
-         if (isReader == true)
-         {
-            readerService = new RemoteLogReaderServiceImpl(context, props);
-            context.registerService(RemoteLogReaderService.class.getName(), readerService, props);
-            readerService.start();
-         }
-         
-         if (isSender == true)
-         {
-            remoteSender = new RemoteLogListener(context, props);
-            remoteSender.start();
-         }
-      }
-      finally
-      {
-         Thread.currentThread().setContextClassLoader(ctxLoader);
-      }
-   }
-
-   public void stop(BundleContext context) throws Exception
-   {
-      if (isReader == true)
-      {
-         readerService.stop();
-         readerService = null;
-      }
-
-      if (isSender == true)
-      {
-         remoteSender.stop();
-         remoteSender = null;
-      }
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/husky/harness/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/husky/harness/pom.xml	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/husky/harness/pom.xml	2009-05-29 12:37:36 UTC (rev 89528)
@@ -56,7 +56,7 @@
         <configuration>
           <instructions>
             <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
-            <Bundle-Activator>org.jboss.osgi.husky.runtime.osgi.Activator</Bundle-Activator>
+            <Bundle-Activator>org.jboss.osgi.husky.runtime.osgi.HuskyActivator</Bundle-Activator>
             <Private-Package>
               org.jboss.osgi.husky.internal,
               org.jboss.osgi.husky.runtime*,

Deleted: projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/Activator.java
===================================================================
--- projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/Activator.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/Activator.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.husky.runtime.osgi;
-
-// $Id$
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * [TODO]
- * 
- * @author Thomas.Diesler at jboss.com
- * @since 17-May-2009
- */
-public class Activator implements BundleActivator
-{
-   private SocketConnector socketConnector;
-   private JMXConnector jmxConnector;
-   
-   public void start(BundleContext context) throws Exception
-   {
-      jmxConnector = new JMXConnector(context);
-      jmxConnector.start();
-      
-      if (SocketConnector.isRemoteConnection(context))
-      {
-         socketConnector = new SocketConnector(context);
-         socketConnector.start();
-      }
-      
-      context.addBundleListener(new Extender(context));
-   }
-
-   public void stop(BundleContext context) throws Exception
-   {
-      if (socketConnector != null)
-      {
-         socketConnector.stop();
-         socketConnector = null;
-      }
-      
-      if (jmxConnector != null)
-      {
-         jmxConnector.stop();
-         jmxConnector = null;
-      }
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/HuskyActivator.java (from rev 89516, projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/Activator.java)
===================================================================
--- projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/HuskyActivator.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/HuskyActivator.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.husky.runtime.osgi;
+
+// $Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * [TODO]
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 17-May-2009
+ */
+public class HuskyActivator implements BundleActivator
+{
+   private SocketConnector socketConnector;
+   private JMXConnector jmxConnector;
+   
+   public void start(BundleContext context) throws Exception
+   {
+      jmxConnector = new JMXConnector(context);
+      jmxConnector.start();
+      
+      if (SocketConnector.isRemoteConnection(context))
+      {
+         socketConnector = new SocketConnector(context);
+         socketConnector.start();
+      }
+      
+      context.addBundleListener(new Extender(context));
+   }
+
+   public void stop(BundleContext context) throws Exception
+   {
+      if (socketConnector != null)
+      {
+         socketConnector.stop();
+         socketConnector = null;
+      }
+      
+      if (jmxConnector != null)
+      {
+         jmxConnector.stop();
+         jmxConnector = null;
+      }
+   }
+}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiBootstrap.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiBootstrap.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiBootstrap.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -59,10 +59,10 @@
    private static final String JBOSS_BIND_ADDRESS = "jboss.bind.address";
    private static final String JBOSS_SERVER_NAME = "jboss.server.name";
 
-   @Option(name = "-c", usage = "Sets the server config (must )")
+   @Option(name = "-c", aliases = { "--server-name" }, usage = "Sets the server config (-c minimal)")
    public String serverName = "default";
 
-   @Option(name = "-b", usage = "Sets the bind address")
+   @Option(name = "-b", aliases = { "--bind-address" }, usage = "Sets the bind address (-b 127.0.0.1)")
    public String bindAdress = "localhost";
 
    /*
@@ -105,7 +105,7 @@
       defaults.setProperty(JBOSS_BIND_ADDRESS, bindAdress);
       defaults.setProperty(JAVA_PROTOCOL_HANDLERS, "org.jboss.net.protocol|org.jboss.virtual.protocol");
 
-      getLogger().info("JBoss OSGi System Properties");
+      getLogger().debug("JBoss OSGi System Properties");
 
       Enumeration<?> defaultNames = defaults.propertyNames();
       while (defaultNames.hasMoreElements())
@@ -116,7 +116,7 @@
          {
             String propValue = defaults.getProperty(propName);
             System.setProperty(propName, propValue);
-            getLogger().info("   " + propName + "=" + propValue);
+            getLogger().debug("   " + propName + "=" + propValue);
          }
       }
    }

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/BlueprintCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/BlueprintCapability.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/BlueprintCapability.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -36,6 +36,9 @@
 {
    public BlueprintCapability()
    {
+      // [TODO] make this a reference
+      super ("org.jboss.osgi.common.service.BlueprintService");
+      
       addBundle("bundles/jboss-osgi-blueprint.jar");
    }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/Capability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/Capability.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/Capability.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -37,13 +37,20 @@
  */
 public abstract class Capability
 {
+   private String serviceName;
    private Properties props = new Properties();
    private Set<String> bundles = new LinkedHashSet<String>();
-   
-   public Capability()
+
+   public Capability(String serviceName)
    {
+      this.serviceName = serviceName;
    }
 
+   public String getServiceName()
+   {
+      return serviceName;
+   }
+
    public Properties getProperties()
    {
       return props;
@@ -53,7 +60,7 @@
    {
       bundles.add(bundle);
    }
-   
+
    protected void addBundles(List<String> bundles)
    {
       for (String bundle : bundles)
@@ -61,7 +68,7 @@
          addBundle(bundle);
       }
    }
-   
+
    public List<String> getBundles()
    {
       return new ArrayList<String>(bundles);

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/ConfigAdminCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/ConfigAdminCapability.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/ConfigAdminCapability.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -21,7 +21,9 @@
  */
 package org.jboss.osgi.spi.testing.capability;
 
+import org.osgi.service.cm.ConfigurationAdmin;
 
+
 //$Id$
 
 /**
@@ -34,6 +36,7 @@
 {
    public ConfigAdminCapability()
    {
+      super(ConfigurationAdmin.class.getName());
       addBundle("bundles/org.apache.felix.metatype.jar");
       addBundle("bundles/org.apache.felix.configadmin.jar");
    }

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/HttpCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/HttpCapability.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/HttpCapability.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -23,7 +23,9 @@
 
 import java.util.Properties;
 
+import org.osgi.service.http.HttpService;
 
+
 //$Id$
 
 /**
@@ -36,6 +38,8 @@
 {
    public HttpCapability()
    {
+      super(HttpService.class.getName());
+      
       Properties props = getProperties();
       props.setProperty("org.osgi.service.http.port", "8090");
 

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/HuskyCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/HuskyCapability.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/HuskyCapability.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -22,6 +22,7 @@
 package org.jboss.osgi.spi.testing.capability;
 
 
+
 //$Id$
 
 /**
@@ -34,6 +35,8 @@
 {
    public HuskyCapability()
    {
+      // [TODO] make this a reference
+      super("org.jboss.osgi.husky.runtime.Connector");
       addBundle("bundles/jboss-osgi-husky.jar");
    }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/JAXBCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/JAXBCapability.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/JAXBCapability.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -21,7 +21,6 @@
  */
 package org.jboss.osgi.spi.testing.capability;
 
-
 //$Id$
 
 
@@ -35,6 +34,9 @@
 {
    public JAXBCapability()
    {
+      // [TODO] make this a reference
+      super("org.jboss.osgi.common.service.JAXBService");
+      
       addBundles(new XMLParserCapability().getBundles());
       addBundle("bundles/jboss-osgi-jaxb.jar");
    }

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/JMXCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/JMXCapability.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/JMXCapability.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -25,8 +25,10 @@
 
 import java.util.Properties;
 
+import javax.management.MBeanServer;
 
 
+
 /**
  * [TODO]
  * 
@@ -37,6 +39,8 @@
 {
    public JMXCapability()
    {
+      super(MBeanServer.class.getName());
+      
       Properties props = getProperties();
       props.setProperty("org.jboss.osgi.jmx.host", System.getProperty("jboss.bind.address", "localhost"));
       props.setProperty("org.jboss.osgi.jmx.rmi.port", "1198");

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/JNDICapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/JNDICapability.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/JNDICapability.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -25,8 +25,10 @@
 
 import java.util.Properties;
 
+import javax.naming.InitialContext;
 
 
+
 /**
  * [TODO]
  * 
@@ -37,6 +39,8 @@
 {
    public JNDICapability()
    {
+      super(InitialContext.class.getName());
+      
       Properties props = getProperties();
       props.setProperty("org.jboss.osgi.jndi.host", System.getProperty("jboss.bind.address", "localhost"));
       props.setProperty("org.jboss.osgi.jndi.rmi.port", "1198");

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/MicrocontainerCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/MicrocontainerCapability.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/MicrocontainerCapability.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -35,6 +35,9 @@
 {
    public MicrocontainerCapability()
    {
+      // [TODO] make this a reference
+      super("org.jboss.osgi.common.service.MicrocontainerService");
+      
       addBundles(new JMXCapability().getBundles());
       addBundles(new XMLBindingCapability().getBundles());
       addBundle("bundles/jboss-osgi-microcontainer.jar");

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/RemoteLogCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/RemoteLogCapability.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/RemoteLogCapability.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -37,6 +37,9 @@
 {
    public RemoteLogCapability()
    {
+      // [TODO] make this a reference
+      super("org.jboss.osgi.common.service.RemoteLogService");
+      
       Properties props = getProperties();
       props.setProperty("org.jboss.osgi.service.remote.log.reader", "true");
       props.setProperty("org.jboss.osgi.remote.log.host", System.getProperty("jboss.bind.address", "localhost"));

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/XMLBindingCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/XMLBindingCapability.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/XMLBindingCapability.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -35,6 +35,9 @@
 {
    public XMLBindingCapability()
    {
+      // [TODO] make this a reference
+      super ("org.jboss.osgi.common.service.XMLBindingService");
+      
       addBundles(new JAXBCapability().getBundles());
       addBundle("bundles/jboss-osgi-common-core.jar");
       addBundle("bundles/jboss-osgi-xml-binding.jar");

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/XMLParserCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/XMLParserCapability.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/capability/XMLParserCapability.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -21,7 +21,9 @@
  */
 package org.jboss.osgi.spi.testing.capability;
 
+import javax.xml.parsers.SAXParserFactory;
 
+
 //$Id$
 
 
@@ -35,6 +37,8 @@
 {
    public XMLParserCapability()
    {
+      super(SAXParserFactory.class.getName());
+      
       addBundle("bundles/jboss-osgi-apache-xerces.jar");
    }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -36,6 +36,7 @@
 import org.jboss.osgi.spi.logging.LogEntryCache;
 import org.jboss.osgi.spi.testing.OSGiBundle;
 import org.jboss.osgi.spi.testing.OSGiRuntime;
+import org.jboss.osgi.spi.testing.OSGiServiceReference;
 import org.jboss.osgi.spi.testing.OSGiTestHelper;
 import org.jboss.osgi.spi.testing.capability.Capability;
 import org.osgi.framework.BundleException;
@@ -81,43 +82,48 @@
 
    public void addCapability(Capability capability) throws BundleException
    {
-      log.debug("Add capability : " + capability);
+      OSGiServiceReference sref = getServiceReference(capability.getServiceName());
+      if (sref == null)
+      {
+         log.debug("Add capability : " + capability);
 
-      for (String location : capability.getBundles())
-      {
-         if (bundles.get(location) == null)
+         for (String location : capability.getBundles())
          {
-            OSGiBundle bundle = installBundle(location);
-            bundle.start();
+            if (bundles.get(location) == null)
+            {
+               OSGiBundle bundle = installBundle(location);
+               bundle.start();
 
-            bundles.put(location, bundle);
+               bundles.put(location, bundle);
+            }
          }
+         capabilities.add(capability);
       }
-      capabilities.add(capability);
    }
 
    public void removeCapability(Capability capability)
    {
-      log.debug("Remove capability : " + capability);
+      if (capabilities.remove(capability))
+      {
+         log.debug("Remove capability : " + capability);
+         
+         List<String> bundleLocations = capability.getBundles();
+         Collections.reverse(bundleLocations);
 
-      capabilities.remove(capability);
-
-      List<String> bundleLocations = capability.getBundles();
-      Collections.reverse(bundleLocations);
-
-      for (String location : bundleLocations)
-      {
-         OSGiBundle bundle = bundles.remove(location);
-         if (bundle != null)
+         for (String location : bundleLocations)
          {
-            try
+            OSGiBundle bundle = bundles.remove(location);
+            if (bundle != null)
             {
-               bundle.uninstall();
+               try
+               {
+                  bundle.uninstall();
+               }
+               catch (BundleException ex)
+               {
+                  log.error("Cannot uninstall bundle: " + bundle);
+               }
             }
-            catch (BundleException ex)
-            {
-               log.error("Cannot uninstall bundle: " + bundle);
-            }
          }
       }
    }

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java	2009-05-29 11:53:48 UTC (rev 89527)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java	2009-05-29 12:37:36 UTC (rev 89528)
@@ -47,12 +47,6 @@
 import org.jboss.osgi.spi.testing.OSGiPackageAdmin;
 import org.jboss.osgi.spi.testing.OSGiServiceReference;
 import org.jboss.osgi.spi.testing.OSGiTestHelper;
-import org.jboss.osgi.spi.testing.capability.Capability;
-import org.jboss.osgi.spi.testing.capability.ConfigAdminCapability;
-import org.jboss.osgi.spi.testing.capability.HttpCapability;
-import org.jboss.osgi.spi.testing.capability.JMXCapability;
-import org.jboss.osgi.spi.testing.capability.JNDICapability;
-import org.jboss.osgi.spi.testing.capability.MicrocontainerCapability;
 import org.jboss.osgi.spi.testing.capability.RemoteLogCapability;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
@@ -72,8 +66,7 @@
 {
    private MBeanServerConnection mbeanServer;
    private ManagedFrameworkMBean managedFramework;
-   private Set<Class<?>> ignoredCaps = new HashSet<Class<?>>();
-   
+
    // Needed for remote logging
    private EmbeddedRuntime embeddedRuntime;
    private RemoteLogCapability remoteLogCapability;
@@ -81,13 +74,6 @@
    public RemoteRuntime(OSGiTestHelper helper)
    {
       super(helper);
-
-      // Initialize the ignored capabilities
-      ignoredCaps.add(ConfigAdminCapability.class);
-      ignoredCaps.add(HttpCapability.class);
-      ignoredCaps.add(JNDICapability.class);
-      ignoredCaps.add(JMXCapability.class);
-      ignoredCaps.add(MicrocontainerCapability.class);
    }
 
    public OSGiBundle installBundle(String location) throws BundleException
@@ -124,15 +110,6 @@
       }
    }
 
-   @Override
-   public void addCapability(Capability capability) throws BundleException
-   {
-      if (ignoredCaps.contains(capability.getClass()))
-         return;
-
-      super.addCapability(capability);
-   }
-
    public OSGiBundle[] getBundles()
    {
       try
@@ -144,7 +121,7 @@
 
          OSGiBundle[] bundleArr = new OSGiBundle[bundles.size()];
          bundles.toArray(bundleArr);
-         
+
          return bundleArr;
       }
       catch (Exception ex)
@@ -162,30 +139,30 @@
    public OSGiServiceReference[] getServiceReferences(String clazz, String filter) throws InvalidSyntaxException
    {
       OSGiServiceReference[] srefs = null;
-      
+
       ManagedServiceReference[] manrefs = getRemoteFramework().getServiceReferences(clazz, filter);
       if (manrefs != null)
       {
          srefs = new OSGiServiceReference[manrefs.length];
-         for(int i=0; i < manrefs.length; i++)
+         for (int i = 0; i < manrefs.length; i++)
             srefs[i] = new RemoteServiceReference(manrefs[i]);
       }
-      
+
       return srefs;
    }
 
    public void startLogEntryTracking(final LogEntryCache logEntryCache)
    {
       super.startLogEntryTracking(logEntryCache);
-      
+
       try
       {
          remoteLogCapability = new RemoteLogCapability();
          addCapability(remoteLogCapability);
-         
+
          embeddedRuntime = (EmbeddedRuntime)getTestHelper().getEmbeddedRuntime();
          embeddedRuntime.addCapability(remoteLogCapability);
-         
+
          // Track the RemoteLogReaderService to add the LogEntryCache as LogListener
          BundleContext context = embeddedRuntime.getBundleContext();
          ServiceTracker tracker = new ServiceTracker(context, RemoteLogReaderService.class.getName(), null)
@@ -215,13 +192,13 @@
          removeCapability(remoteLogCapability);
          remoteLogCapability = null;
       }
-      
+
       if (embeddedRuntime != null)
       {
          embeddedRuntime.shutdown();
          embeddedRuntime = null;
       }
-      
+
       super.stopLogEntryTracking();
    }
 
@@ -247,7 +224,7 @@
       return new RemotePackageAdmin(this);
    }
 
-   private RemoteFramework getRemoteFramework() 
+   private RemoteFramework getRemoteFramework()
    {
       try
       {




More information about the jboss-cvs-commits mailing list