[jboss-cvs] JBossAS SVN: r84917 - in projects/jboss-osgi/trunk: runtime/felix/src/test/java/org/jboss/test/osgi/felix/system and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Mar 2 03:18:40 EST 2009


Author: thomas.diesler at jboss.com
Date: 2009-03-02 03:18:40 -0500 (Mon, 02 Mar 2009)
New Revision: 84917

Added:
   projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/MockFramework.java
   projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/SomeBean.java
   projects/jboss-osgi/trunk/testsuite/src/test/resources/bootstrap/
   projects/jboss-osgi/trunk/testsuite/src/test/resources/bootstrap/mock-bootstrap-beans.xml
   projects/jboss-osgi/trunk/testsuite/src/test/resources/bootstrap/mock-osgi-beans.xml
Modified:
   projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
   projects/jboss-osgi/trunk/runtime/felix/src/test/java/org/jboss/test/osgi/felix/system/SystemBundleTestCase.java
   projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfiguration.java
   projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfigurationProvider.java
   projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerConfigurationProvider.java
   projects/jboss-osgi/trunk/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceImpl.java
   projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/BootstrapTestCase.java
Log:
Simplify SPI bootstrap - more to come

Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java	2009-03-02 08:15:18 UTC (rev 84916)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java	2009-03-02 08:18:40 UTC (rev 84917)
@@ -22,7 +22,6 @@
 package org.jboss.osgi.deployer;
 
 import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
 import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
 import org.osgi.framework.Bundle;

Modified: projects/jboss-osgi/trunk/runtime/felix/src/test/java/org/jboss/test/osgi/felix/system/SystemBundleTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/src/test/java/org/jboss/test/osgi/felix/system/SystemBundleTestCase.java	2009-03-02 08:15:18 UTC (rev 84916)
+++ projects/jboss-osgi/trunk/runtime/felix/src/test/java/org/jboss/test/osgi/felix/system/SystemBundleTestCase.java	2009-03-02 08:18:40 UTC (rev 84917)
@@ -24,6 +24,7 @@
 //$Id$
 
 import org.jboss.osgi.spi.framework.OSGiConfiguration;
+import org.jboss.osgi.spi.framework.OSGiConfigurationProvider;
 import org.jboss.osgi.spi.framework.OSGiFramework;
 import org.jboss.osgi.spi.junit.OSGiTestCase;
 import org.osgi.framework.Bundle;
@@ -36,12 +37,13 @@
  */
 public class SystemBundleTestCase extends OSGiTestCase
 {
-  public void testSystemBundle()
-  {
-    OSGiFramework framework = OSGiConfiguration.getFramework();
-    Bundle bundle = framework.getSystemBundle();
-    
-    assertEquals("BundleId == 0", 0, bundle.getBundleId());
-    assertEquals("SymbolicName == system.bundle", "system.bundle", bundle.getSymbolicName());
-  }
+   public void testSystemBundle()
+   {
+      OSGiConfigurationProvider configProvider = OSGiConfiguration.getConfigurationProvider();
+      OSGiFramework framework = configProvider.getFramework();
+      Bundle bundle = framework.getSystemBundle();
+
+      assertEquals("BundleId == 0", 0, bundle.getBundleId());
+      assertEquals("SymbolicName == system.bundle", "system.bundle", bundle.getSymbolicName());
+   }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfiguration.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfiguration.java	2009-03-02 08:15:18 UTC (rev 84916)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfiguration.java	2009-03-02 08:18:40 UTC (rev 84917)
@@ -27,107 +27,73 @@
 import java.io.InputStreamReader;
 import java.net.URL;
 
-
 /**
- * The Configuration provides a Framework through a ConfigurationProvider
- * </p>
- * A ConfigurationProvider is discovered in two stages
- * <p/>
+ * The OSGiConfiguration provides an OSGiFramework through a OSGiConfigurationProvider
  * 
- * <ol>
- * <li>Read the configuration provider class name from a system property 
- * <li>Read the configuration provider class name from a resource file 
- * </ol> 
- * 
- * In both cases the key is the fully qalified name of the {@link OSGiConfigurationProvider} interface.
- * 
  * @author thomas.diesler at jboss.com
  * @since 18-Jun-2008
  */
 public final class OSGiConfiguration
 {
-  // Hide the ctor
-  private OSGiConfiguration()
-  {
-  }
+   // Hide the ctor
+   private OSGiConfiguration()
+   {
+   }
 
-  /*
-   * Get the OSGi Framework for this configuration
-   *
-   * @return The configured instance of a Framework
-   */
-  public static OSGiFramework getFramework()
-  {
-    return getConfigurationProvider().getFramework();
-  }
+   /**
+    * Get an instance of an OSGiConfigurationProvider. 
+    * </p> 
+    * A OSGiConfigurationProvider is discovered in two stages 
+    * <p/> 
+    * 
+    * <ol> 
+    * <li>Read the configuration provider class name from a system property 
+    * <li>Read the configuration provider class name from a resource file 
+    * </ol> 
+    * 
+    * In both cases the key is the fully qalified name of the {@link OSGiConfigurationProvider} interface.
+    */
+   public static OSGiConfigurationProvider getConfigurationProvider()
+   {
+      OSGiConfigurationProvider provider;
 
-  /*
-   * Get the OSGi Framework for this configuration
-   *
-   * @param attributeProvider the attribute provider
-   * @return The configured instance of a Framework
-   */
-  public static OSGiFramework getFramework(AttributeProvider attributeProvider)
-  {
-    return getConfigurationProvider().getFramework(attributeProvider);
-  }
+      // Get the provider name from the System property
+      String providerName = System.getProperty(OSGiConfigurationProvider.class.getName());
 
-  /*
-   * Get a Framework with a given name from this configuration
-   *
-   * @param attributeProvider the attribute provider
-   * @param frameworkName  the framework name
-   * @return The configured instance of a Framework
-   */
-  public static OSGiFramework getFramework(AttributeProvider attributeProvider, String frameworkName)
-  {
-    return getConfigurationProvider().getFramework(attributeProvider, frameworkName);
-  }
+      // Get the provider name from the resource file
+      if (providerName == null)
+      {
+         ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+         URL providerURL = ctxLoader.getResource(OSGiConfigurationProvider.class.getName());
+         if (providerURL == null)
+            throw new IllegalStateException("Cannot find resource: " + OSGiConfigurationProvider.class.getName());
 
-  /*
-   * Get the ConfigurationProvider
-   */
-  public static OSGiConfigurationProvider getConfigurationProvider()
-  {
-    OSGiConfigurationProvider provider;
+         try
+         {
+            providerName = new BufferedReader(new InputStreamReader(providerURL.openStream())).readLine();
+         }
+         catch (Exception e)
+         {
+            throw new IllegalStateException("Cannot read configuration provider name from: " + providerURL);
+         }
+      }
 
-    // Get the provider name from the System property
-    String providerName = System.getProperty(OSGiConfigurationProvider.class.getName());
+      // Verify that we have a provider name
+      if (providerName == null)
+         throw new IllegalStateException("Cannot obtain configuration provider");
 
-    // Get the provider name from the resource file
-    if (providerName == null)
-    {
-      ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
-      URL providerURL = ctxLoader.getResource(OSGiConfigurationProvider.class.getName());
-      if (providerURL == null)
-        throw new IllegalStateException("Cannot find resource: " + OSGiConfigurationProvider.class.getName());
-
+      // Load the config provider
       try
       {
-        providerName = new BufferedReader(new InputStreamReader(providerURL.openStream())).readLine();
+         ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+         Class<?> providerClass = ctxLoader.loadClass(providerName);
+         provider = (OSGiConfigurationProvider)providerClass.newInstance();
       }
       catch (Exception e)
       {
-        throw new IllegalStateException("Cannot read configuration provider name from: " + providerURL);
+         throw new IllegalStateException("Cannot load configuration provider: " + providerName);
       }
-    }
 
-    // Verify that we have a provider name
-    if (providerName == null)
-      throw new IllegalStateException("Cannot obtain configuration provider");
-
-    // Load the config provider
-    try
-    {
-      ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
-      Class<?> providerClass = ctxLoader.loadClass(providerName);
-      provider = (OSGiConfigurationProvider)providerClass.newInstance();
-    }
-    catch (Exception e)
-    {
-      throw new IllegalStateException("Cannot load configuration provider: " + providerName);
-    }
-
-    return provider;
-  }
+      return provider;
+   }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfigurationProvider.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfigurationProvider.java	2009-03-02 08:15:18 UTC (rev 84916)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfigurationProvider.java	2009-03-02 08:18:40 UTC (rev 84917)
@@ -26,36 +26,36 @@
 import java.io.InputStream;
 import java.net.URL;
 
-
 /**
- * The ConfigurationProvider provides a Framework
+ * An OSGiConfigurationProvider provides an OSGiFramework
+ * <p/>
+ * Implementations would configure the OSGiFramework through some
+ * form of descriptor.
+ * <p/>
+ * Natively, the SPI provides an OSGiConfigurationProvider that is based 
+ * on the Microkernel.
  * 
  * @author thomas.diesler at jboss.com
  * @since 18-Jun-2008
  */
-public interface OSGiConfigurationProvider
+public interface OSGiConfigurationProvider extends AttributeProvider
 {
-  /**
-   * Get a Framework from this ConfigurationProvider
-   * Note: the instance itself *must* be a AttributeProvider
-   *
+   public static final String DEFAULT_FRAMEWORK_NAME = "jboss.osgi:service=Framework";
+   public static final String DEFAULT_BOOTSTRAP_BEANS = "jboss-osgi-bootstrap-beans.xml";
+   public static final String DEFAULT_FRAMEWORK_BEANS = "jboss-osgi-beans.xml";
+
+   /**
+   * Get the OSGiFramework that registerd with the default name
+   * 
    * @return The configured instance of a Framework
    * @throws IllegalArgumentException if this is not AttributeProvider instance
    */
    OSGiFramework getFramework();
 
   /**
-   * Get a Framework from this ConfigurationProvider
+   * Get an OSGiFramework with a given name from this ConfigurationProvider
    *
    * @param attributeProvider the attribute provider
-   * @return The configured instance of a Framework
-   */
-   OSGiFramework getFramework(AttributeProvider attributeProvider);
-
-  /**
-   * Get a Framework with a given name from this ConfigurationProvider
-   *
-   * @param attributeProvider the attribute provider
    * @param name the framework name
    * @return The configured instance of a Framework
    */

Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerConfigurationProvider.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerConfigurationProvider.java	2009-03-02 08:15:18 UTC (rev 84916)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerConfigurationProvider.java	2009-03-02 08:18:40 UTC (rev 84917)
@@ -28,7 +28,6 @@
 
 import org.jboss.dependency.spi.Controller;
 import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.kernel.Kernel;
 import org.jboss.kernel.plugins.bootstrap.basic.KernelConstants;
 import org.jboss.osgi.spi.NotImplementedException;
 import org.jboss.osgi.spi.framework.AbstractAttributeProvider;
@@ -42,32 +41,20 @@
  * @author thomas.diesler at jboss.com
  * @since 18-Jun-2008
  */
-public class MicrocontainerConfigurationProvider extends AbstractAttributeProvider implements OSGiConfigurationProvider, AttributeProvider
+public class MicrocontainerConfigurationProvider extends AbstractAttributeProvider implements OSGiConfigurationProvider
 {
-   /* The Framework bean name - jboss.osgi:service=Framework */
-   public static final String DEFAULT_FRAMEWORK_NAME = "jboss.osgi:service=Framework";
-   /* The default framework beans: jboss-osgi-bootstrap-beans.xml */
-   public static final String DEFAULT_BOOTSTRAP_BEANS = "jboss-osgi-bootstrap-beans.xml";
-   /* The default framework beans: jboss-osgi-beans.xml */
-   public static final String DEFAULT_FRAMEWORK_BEANS = "jboss-osgi-beans.xml";
-
    private EmbeddedBeansDeployer deployer = new EmbeddedBeansDeployer();
-   private Kernel kernel;
+   private boolean configured;
 
    public OSGiFramework getFramework()
    {
-      return getFramework(this);
+      return getFramework(this, DEFAULT_FRAMEWORK_NAME);
    }
 
-   public OSGiFramework getFramework(AttributeProvider attributeProvider)
-   {
-      return getFramework(attributeProvider, DEFAULT_FRAMEWORK_NAME);
-   }
-
    public OSGiFramework getFramework(AttributeProvider attributeProvider, String beanName)
    {
       OSGiFramework framework = attributeProvider.getAttribute(beanName, OSGiFramework.class);
-      if (framework == null)
+      if (framework == null && configured == false)
       {
          configure(DEFAULT_FRAMEWORK_BEANS);
          framework = attributeProvider.getAttribute(beanName, OSGiFramework.class);
@@ -86,49 +73,29 @@
       if (urlConfig == null)
          throw new IllegalStateException("Cannot find resource: " + resourceConfig);
 
-      deploy(urlConfig);
+      configure(urlConfig);
    }
 
    public void configure(URL urlConfig)
    {
-      deploy(urlConfig);
-   }
-
-   private void deploy(URL urlConfig)
-   {
-      if (kernel == null)
-         bootstrapKernel();
-
       deployer.deploy(urlConfig);
-
-      if (kernel == null)
-         throw new IllegalStateException("Cannot obtain kernel, after beans deployment");
+      configured = true;
    }
 
-   private void bootstrapKernel()
-   {
-      // Deploy the bootstrap beans if DEFAULT_BOOTSTRAP_BEANS is on the classpath
-      URL urlBootstrap = Thread.currentThread().getContextClassLoader().getResource(DEFAULT_BOOTSTRAP_BEANS);
-      if (urlBootstrap != null)
-         deployer.deploy(urlBootstrap);
-
-      kernel = deployer.getKernel();
-   }
-
    public Object getAttribute(String name)
    {
       Object retObj = null;
 
-      if (kernel == null)
+      if (configured == false)
          bootstrapKernel();
 
       if (KernelConstants.KERNEL_NAME.equals(name))
       {
-         retObj = kernel;
+         retObj = deployer.getKernel();
       }
       else
       {
-         Controller controller = kernel.getController();
+         Controller controller = deployer.getKernel().getController();
          ControllerContext context = controller.getInstalledContext(name);
          if (context != null)
             retObj = context.getTarget();
@@ -136,4 +103,12 @@
 
       return retObj;
    }
+
+   private void bootstrapKernel()
+   {
+      // Deploy the bootstrap beans if DEFAULT_BOOTSTRAP_BEANS is on the classpath
+      URL urlBootstrap = Thread.currentThread().getContextClassLoader().getResource(DEFAULT_BOOTSTRAP_BEANS);
+      if (urlBootstrap != null)
+         deployer.deploy(urlBootstrap);
+   }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceImpl.java	2009-03-02 08:15:18 UTC (rev 84916)
+++ projects/jboss-osgi/trunk/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceImpl.java	2009-03-02 08:18:40 UTC (rev 84917)
@@ -29,8 +29,6 @@
 import javax.servlet.ServletException;
 
 import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
 import org.osgi.service.http.HttpContext;
 import org.osgi.service.http.HttpService;
 import org.osgi.service.http.NamespaceException;

Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/BootstrapTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/BootstrapTestCase.java	2009-03-02 08:15:18 UTC (rev 84916)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/BootstrapTestCase.java	2009-03-02 08:18:40 UTC (rev 84917)
@@ -28,7 +28,8 @@
 import org.jboss.osgi.spi.framework.OSGiConfiguration;
 import org.jboss.osgi.spi.framework.OSGiConfigurationProvider;
 import org.jboss.osgi.spi.framework.OSGiFramework;
-import org.jboss.osgi.spi.junit.IntegrationTestCase;
+import org.jboss.osgi.spi.junit.OSGiTestCase;
+import org.osgi.framework.Bundle;
 
 /**
  * Test the embedded bootstrap of the framework
@@ -36,17 +37,58 @@
  * @author thomas.diesler at jboss.com
  * @since 25-Feb-2009
  */
-public class BootstrapTestCase extends IntegrationTestCase
+public class BootstrapTestCase extends OSGiTestCase
 {
-   static OSGiConfigurationProvider configProvider = OSGiConfiguration.getConfigurationProvider();
-   
    public void testFrameworkBootstrap() throws Exception
    {
+      OSGiConfigurationProvider configProvider = OSGiConfiguration.getConfigurationProvider();
       OSGiFramework framework = configProvider.getFramework();
       assertNotNull("Framework not null", framework);
       
+      Bundle bundle = framework.getSystemBundle();
+
+      assertEquals("BundleId == 0", 0, bundle.getBundleId());
+      assertEquals("SymbolicName == system.bundle", "system.bundle", bundle.getSymbolicName());
+      
       AttributeProvider attProvider = (AttributeProvider)configProvider;
       MainDeployer mainDeployer = (MainDeployer)attProvider.getAttribute("MainDeployer");
       assertNotNull("MainDeployer not null", mainDeployer);
    }
+
+   public void testGetConfigurationProvider() throws Exception
+   {
+      OSGiConfigurationProvider cp1 = OSGiConfiguration.getConfigurationProvider();
+      OSGiConfigurationProvider cp2 = OSGiConfiguration.getConfigurationProvider();
+      assertNotSame("Multiple provider instances", cp1, cp2);
+   }
+
+   public void testConfigureFromResource() throws Exception
+   {
+      OSGiConfigurationProvider cp = OSGiConfiguration.getConfigurationProvider();
+      cp.configure("bootstrap/mock-bootstrap-beans.xml");
+      
+      SomeBean bean = (SomeBean)cp.getAttribute("SomeBean");
+      assertNotNull("Bean not null", bean);
+      
+      OSGiFramework framework = cp.getFramework();
+      assertNull("Framework null", framework);
+      
+      cp.configure("bootstrap/mock-osgi-beans.xml");
+      assertNotNull("Framework not null", cp.getFramework());
+   }
+
+   public void testConfigureFromURL() throws Exception
+   {
+      OSGiConfigurationProvider cp = OSGiConfiguration.getConfigurationProvider();
+      cp.configure(getResourceURL("bootstrap/mock-bootstrap-beans.xml"));
+      
+      SomeBean bean = (SomeBean)cp.getAttribute("SomeBean");
+      assertNotNull("Bean not null", bean);
+      
+      OSGiFramework framework = cp.getFramework();
+      assertNull("Framework null", framework);
+      
+      cp.configure(getResourceURL("bootstrap/mock-osgi-beans.xml"));
+      assertNotNull("Framework not null", cp.getFramework());
+   }
 }
\ No newline at end of file

Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/MockFramework.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/MockFramework.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/MockFramework.java	2009-03-02 08:18:40 UTC (rev 84917)
@@ -0,0 +1,47 @@
+/*
+ * 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.test.osgi.bootstrap;
+
+//$Id$
+
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * A mock framework
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 25-Feb-2009
+ */
+public class MockFramework implements OSGiFramework
+{
+   public Bundle getSystemBundle()
+   {
+      return null;
+   }
+
+   public BundleContext getSystemBundleContext()
+   {
+      return null;
+   }
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/MockFramework.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/SomeBean.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/SomeBean.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/SomeBean.java	2009-03-02 08:18:40 UTC (rev 84917)
@@ -0,0 +1,35 @@
+/*
+ * 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.test.osgi.bootstrap;
+
+//$Id$
+
+
+/**
+ * Some pojo
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 25-Feb-2009
+ */
+public class SomeBean
+{
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/bootstrap/SomeBean.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/trunk/testsuite/src/test/resources/bootstrap/mock-bootstrap-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/bootstrap/mock-bootstrap-beans.xml	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/bootstrap/mock-bootstrap-beans.xml	2009-03-02 08:18:40 UTC (rev 84917)
@@ -0,0 +1,8 @@
+<!--
+  $Id$ 
+-->
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="SomeBean" class="org.jboss.test.osgi.bootstrap.SomeBean"/>
+
+</deployment>


Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/resources/bootstrap/mock-bootstrap-beans.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/trunk/testsuite/src/test/resources/bootstrap/mock-osgi-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/bootstrap/mock-osgi-beans.xml	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/bootstrap/mock-osgi-beans.xml	2009-03-02 08:18:40 UTC (rev 84917)
@@ -0,0 +1,10 @@
+<!--
+  $Id$ 
+-->
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="jboss.osgi:service=Framework" class="org.jboss.test.osgi.bootstrap.MockFramework"/>
+ 
+ <bean name="jboss.osgi:service=SomeOtherFramework" class="org.jboss.test.osgi.bootstrap.MockFramework"/>
+ 
+</deployment>


Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/resources/bootstrap/mock-osgi-beans.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jboss-cvs-commits mailing list