[jboss-cvs] JBossAS SVN: r91542 - in projects/jboss-osgi/trunk/testsuite/example: src/test/java/org/jboss/test/osgi/example and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jul 22 05:06:17 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-07-22 05:06:17 -0400 (Wed, 22 Jul 2009)
New Revision: 91542

Added:
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/blueprint-example.xml
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/example-blueprint.bnd
Removed:
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintContainerTestCase.java
Modified:
   projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml
   projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/bundle/BeanA.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/bundle/BeanB.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/bundle/ServiceA.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/bundle/ServiceB.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/xml/jaxb/example-xml-jaxb.bnd
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/xml/parser/example-xml-parser.bnd
Log:
[JBOSGI-73] Provide Blueprint example

Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml	2009-07-22 08:26:39 UTC (rev 91541)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml	2009-07-22 09:06:17 UTC (rev 91542)
@@ -42,6 +42,9 @@
 
     <!-- Please add alphabetically -->
 
+    <!-- blueprint -->
+    <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-blueprint.jar" files="${tests.resources.dir}/blueprint/example-blueprint.bnd" />
+  	
     <!-- http -->
     <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-http.jar" files="${tests.resources.dir}/http/example-http.bnd" />
 

Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml	2009-07-22 08:26:39 UTC (rev 91541)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml	2009-07-22 09:06:17 UTC (rev 91542)
@@ -16,6 +16,7 @@
       <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
       <includes>
         <include>*:jboss-osgi-apache-xerces:jar</include>
+        <include>*:jboss-osgi-blueprint:jar</include>
         <include>*:jboss-osgi-common:jar</include>
         <include>*:jboss-osgi-common-core:jar</include>
         <include>*:jboss-osgi-husky:jar</include>

Copied: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint (from rev 91539, projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container)

Deleted: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintContainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java	2009-07-22 06:02:38 UTC (rev 91539)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintContainerTestCase.java	2009-07-22 09:06:17 UTC (rev 91542)
@@ -1,279 +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.test.osgi.blueprint.container;
-
-//$Id$
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeNotNull;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.management.MBeanServer;
-
-import org.jboss.osgi.blueprint.BlueprintCapability;
-import org.jboss.osgi.husky.Bridge;
-import org.jboss.osgi.husky.BridgeFactory;
-import org.jboss.osgi.husky.HuskyCapability;
-import org.jboss.osgi.husky.annotation.ProvideContext;
-import org.jboss.osgi.spi.testing.OSGiBundle;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
-import org.jboss.osgi.spi.testing.OSGiTestHelper;
-import org.jboss.test.osgi.blueprint.container.bundle.BeanA;
-import org.jboss.test.osgi.blueprint.container.bundle.BeanB;
-import org.jboss.test.osgi.blueprint.container.bundle.ServiceA;
-import org.jboss.test.osgi.blueprint.container.bundle.ServiceB;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.blueprint.container.BlueprintContainer;
-import org.osgi.service.blueprint.reflect.BeanMetadata;
-import org.osgi.service.blueprint.reflect.ComponentMetadata;
-import org.osgi.service.blueprint.reflect.ReferenceMetadata;
-import org.osgi.service.blueprint.reflect.ServiceMetadata;
-
-/**
- * BlueprintContainer API tests
- * 
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class BlueprintContainerTestCase
-{
-   @ProvideContext
-   public static BundleContext context;
-
-   private static OSGiRuntime runtime;
-   private static Bridge huskyBridge;
-
-   @BeforeClass
-   public static void beforeClass() throws Exception
-   {
-      if (context == null)
-      {
-         runtime = new OSGiTestHelper().getDefaultRuntime();
-         runtime.addCapability(new HuskyCapability());
-         runtime.addCapability(new BlueprintCapability());
-         
-         huskyBridge = BridgeFactory.getBridge();
-         
-         OSGiBundle bundle = runtime.installBundle("container-basic.jar");
-         bundle.start();
-      }
-   }
-
-   @AfterClass
-   public static void afterClass() throws Exception
-   {
-      if (context == null)
-         runtime.shutdown();
-   }
-
-   @Test
-   public void testBlueprintBundleInstall() throws Exception
-   {
-      if (context == null)
-         huskyBridge.run();
-      
-      assumeNotNull(context);
-      
-      Bundle bundle = context.getBundle();
-      assertEquals("container-basic", bundle.getSymbolicName());
-   }
-
-   @Test
-   public void testBlueprintContainerAvailable() throws Exception
-   {
-      if (context == null)
-         huskyBridge.run();
-      
-      assumeNotNull(context);
-      
-      BlueprintContainer bpContainer = getBlueprintContainer();
-      assertNotNull("BlueprintContainer available", bpContainer);
-   }
-
-   @Test
-   public void getComponent() throws Exception
-   {
-      if (context == null)
-         huskyBridge.run();
-      
-      assumeNotNull(context);
-      
-      BlueprintContainer bpContainer = getBlueprintContainer();
-      BeanA beanA = (BeanA)bpContainer.getComponentInstance("beanA");
-      assertNotNull("ComponentInstance available", beanA);
-   }
-
-   @Test
-   public void getService() throws Exception
-   {
-      if (context == null)
-         huskyBridge.run();
-      
-      assumeNotNull(context);
-      
-      ServiceReference srefA = context.getServiceReference(ServiceA.class.getName());
-      assertNotNull("ServiceReference available", srefA);
-      
-      ServiceA serviceA = (ServiceA)context.getService(srefA);
-      assertNotNull("Service available", serviceA);
-      
-      ServiceReference srefB = context.getServiceReference(ServiceB.class.getName());
-      assertNotNull("ServiceReference available", srefB);
-      
-      ServiceB serviceB = (ServiceB)context.getService(srefB);
-      assertNotNull("Service available", serviceB);
-      
-      BeanB beanB = (BeanB)serviceB;
-      BeanA beanA = beanB.getBeanA();
-      assertNotNull("BeanA available", beanA);
-      
-      MBeanServer mbeanServer = beanA.getMbeanServer();
-      assertNotNull("MBeanServer available", mbeanServer);
-   }
-
-   @Test
-   public void testComponentMetadataByName() throws Exception
-   {
-      if (context == null)
-         huskyBridge.run();
-      
-      assumeNotNull(context);
-      
-      BlueprintContainer bpContainer = getBlueprintContainer();
-      ComponentMetadata compMetadata = bpContainer.getComponentMetadata("beanA");
-      
-      assertNotNull("ComponentMetadata not null", compMetadata);
-      assertEquals("beanA", compMetadata.getId());
-   }
-
-   @Test
-   public void getComponentIds() throws Exception
-   {
-      if (context == null)
-         huskyBridge.run();
-      
-      assumeNotNull(context);
-      
-      BlueprintContainer bpContainer = getBlueprintContainer();
-      Set<String> compNames = bpContainer.getComponentIds();
-
-      assertNotNull("ComponentNames not null", compNames);
-      assertEquals("ComponentNames size", 4, compNames.size());
-      assertTrue("ComponentNames contains beanA", compNames.contains("beanA"));
-      assertTrue("ComponentNames contains serviceA", compNames.contains("serviceA"));
-      assertTrue("ComponentNames contains serviceB", compNames.contains("serviceB"));
-      assertTrue("ComponentNames contains mbeanService", compNames.contains("mbeanService"));
-   }
-
-   @Test
-   public void testBeanMetadata() throws Exception
-   {
-      if (context == null)
-         huskyBridge.run();
-      
-      assumeNotNull(context);
-      
-      BlueprintContainer bpContainer = getBlueprintContainer();
-      Collection<BeanMetadata> bcMetadata = bpContainer.getMetadata(BeanMetadata.class);
-      
-      assertNotNull("BeanComponentsMetadata not null", bcMetadata);
-      assertEquals("BeanComponentsMetadata size", 1, bcMetadata.size());
-      
-      BeanMetadata bmd = bcMetadata.iterator().next();
-      assertEquals("beanA", bmd.getId());
-      assertEquals(BeanA.class.getName(), bmd.getClassName());
-   }
-
-   @Test
-   public void testServiceMetadata() throws Exception
-   {
-      if (context == null)
-         huskyBridge.run();
-      
-      assumeNotNull(context);
-      
-      BlueprintContainer bpContainer = getBlueprintContainer();
-      Collection<ServiceMetadata> servicesMetadata = bpContainer.getMetadata(ServiceMetadata.class);
-
-      assertNotNull("ServiceMetadata not null", servicesMetadata);
-      assertEquals("ServiceMetadata size", 2, servicesMetadata.size());
-      
-      Iterator<ServiceMetadata> itServices = servicesMetadata.iterator();
-      ServiceMetadata serviceA = itServices.next();
-      assertEquals("serviceA", serviceA.getId());
-      
-      List<String> interfaceNamesA = serviceA.getInterfaces();
-      assertNotNull("InterfaceNames not null", interfaceNamesA);
-      assertEquals("InterfaceNames size", 1, interfaceNamesA.size());
-      assertEquals("InterfaceName", ServiceA.class.getName(), interfaceNamesA.get(0));
-      
-      ServiceMetadata serviceB = itServices.next();
-      assertEquals("serviceB", serviceB.getId());
-      
-      List<String> interfaceNamesB = serviceB.getInterfaces();
-      assertNotNull("InterfaceNames not null", interfaceNamesB);
-      assertEquals("InterfaceNames size", 1, interfaceNamesB.size());
-      assertEquals("InterfaceName", ServiceB.class.getName(), interfaceNamesB.get(0));
-   }
-
-   @Test
-   public void testServiceReferenceMetadata() throws Exception
-   {
-      if (context == null)
-         huskyBridge.run();
-      
-      assumeNotNull(context);
-      
-      BlueprintContainer bpContainer = getBlueprintContainer();
-      Collection<ReferenceMetadata> srefsMetadata = bpContainer.getMetadata(ReferenceMetadata.class);
-
-      assertNotNull("ReferenceMetadata not null", srefsMetadata);
-      assertEquals("ReferenceMetadata size", 1, srefsMetadata.size());
-      
-      ReferenceMetadata srefMetadata = srefsMetadata.iterator().next();
-      assertEquals("mbeanService", srefMetadata.getId());
-      
-      String interfaceName = srefMetadata.getInterface();
-      assertNotNull("InterfaceName not null", interfaceName);
-      assertEquals("InterfaceName", MBeanServer.class.getName(), interfaceName);
-   }
-
-   private BlueprintContainer getBlueprintContainer()
-   {
-      ServiceReference sref = context.getServiceReference(BlueprintContainer.class.getName());
-      assertNotNull("BlueprintContainer service not null", sref);
-      
-      BlueprintContainer bpContainer = (BlueprintContainer)context.getService(sref);
-      return bpContainer;
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java (from rev 91539, projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java	2009-07-22 09:06:17 UTC (rev 91542)
@@ -0,0 +1,146 @@
+/*
+ * 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.example.blueprint;
+
+//$Id$
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assume.assumeNotNull;
+
+import javax.management.MBeanServer;
+
+import org.jboss.osgi.blueprint.BlueprintCapability;
+import org.jboss.osgi.husky.Bridge;
+import org.jboss.osgi.husky.BridgeFactory;
+import org.jboss.osgi.husky.HuskyCapability;
+import org.jboss.osgi.husky.annotation.ProvideContext;
+import org.jboss.osgi.spi.testing.OSGiBundle;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
+import org.jboss.osgi.spi.testing.OSGiTestHelper;
+import org.jboss.test.osgi.example.blueprint.bundle.BeanA;
+import org.jboss.test.osgi.example.blueprint.bundle.ServiceA;
+import org.jboss.test.osgi.example.blueprint.bundle.ServiceB;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+
+/**
+ * Blueprint example test.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 12-Jul-2009
+ */
+public class BlueprintTestCase
+{
+   @ProvideContext
+   public static BundleContext context;
+
+   private static OSGiRuntime runtime;
+   private static Bridge huskyBridge;
+
+   @BeforeClass
+   public static void beforeClass() throws Exception
+   {
+      if (context == null)
+      {
+         runtime = new OSGiTestHelper().getDefaultRuntime();
+         runtime.addCapability(new HuskyCapability());
+         runtime.addCapability(new BlueprintCapability());
+         
+         huskyBridge = BridgeFactory.getBridge();
+         
+         OSGiBundle bundle = runtime.installBundle("example-blueprint.jar");
+         bundle.start();
+      }
+   }
+
+   @AfterClass
+   public static void afterClass() throws Exception
+   {
+      if (context == null)
+         runtime.shutdown();
+   }
+
+   @Test
+   public void testBlueprintBundleInstall() throws Exception
+   {
+      if (context == null)
+         huskyBridge.run();
+      
+      assumeNotNull(context);
+      
+      Bundle bundle = context.getBundle();
+      assertEquals("example-blueprint", bundle.getSymbolicName());
+   }
+
+   @Test
+   public void testBlueprintContainerAvailable() throws Exception
+   {
+      if (context == null)
+         huskyBridge.run();
+      
+      assumeNotNull(context);
+      
+      ServiceReference sref = context.getServiceReference(BlueprintContainer.class.getName());
+      assertNotNull("BlueprintContainer service not null", sref);
+      
+      BlueprintContainer bpContainer = (BlueprintContainer)context.getService(sref);
+      assertNotNull("BlueprintContainer available", bpContainer);
+   }
+
+   @Test
+   public void testServiceA() throws Exception
+   {
+      if (context == null)
+         huskyBridge.run();
+      
+      assumeNotNull(context);
+
+      ServiceReference sref = context.getServiceReference(ServiceA.class.getName());
+      assertNotNull("ServiceA not null", sref);
+      
+      ServiceA service = (ServiceA)context.getService(sref);
+      MBeanServer mbeanServer = service.getMbeanServer();
+      assertNotNull("MBeanServer not null", mbeanServer);
+   }
+
+   @Test
+   public void testServiceB() throws Exception
+   {
+      if (context == null)
+         huskyBridge.run();
+      
+      assumeNotNull(context);
+
+      ServiceReference sref = context.getServiceReference(ServiceB.class.getName());
+      assertNotNull("ServiceB not null", sref);
+      
+      ServiceB service = (ServiceB)context.getService(sref);
+      BeanA beanA = service.getBeanA();
+      assertNotNull("BeanA not null", beanA);
+   }
+}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/bundle/BeanA.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/bundle/BeanA.java	2009-07-22 06:02:38 UTC (rev 91539)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/bundle/BeanA.java	2009-07-22 09:06:17 UTC (rev 91542)
@@ -19,7 +19,7 @@
  * 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.blueprint.container.bundle;
+package org.jboss.test.osgi.example.blueprint.bundle;
 
 import javax.management.MBeanServer;
 
@@ -38,7 +38,6 @@
 
    public BeanA()
    {
-      System.out.println("new BeanA");
    }
 
    public MBeanServer getMbeanServer()
@@ -48,7 +47,6 @@
 
    public void setMbeanServer(MBeanServer mbeanServer)
    {
-      System.out.println("BeanA: setMbeanServer");
       this.mbeanServer = mbeanServer;
    }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/bundle/BeanB.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/bundle/BeanB.java	2009-07-22 06:02:38 UTC (rev 91539)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/bundle/BeanB.java	2009-07-22 09:06:17 UTC (rev 91542)
@@ -19,7 +19,7 @@
  * 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.blueprint.container.bundle;
+package org.jboss.test.osgi.example.blueprint.bundle;
 
 
 //$Id$
@@ -36,7 +36,6 @@
 
    public BeanB()
    {
-      System.out.println("new BeanB");
    }
 
    public BeanA getBeanA()
@@ -46,7 +45,6 @@
 
    public void setBeanA(BeanA beanA)
    {
-      System.out.println("BeanB: setBeanA");
       this.beanA = beanA;
    }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/bundle/ServiceA.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/bundle/ServiceA.java	2009-07-22 06:02:38 UTC (rev 91539)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/bundle/ServiceA.java	2009-07-22 09:06:17 UTC (rev 91542)
@@ -19,8 +19,10 @@
  * 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.blueprint.container.bundle;
+package org.jboss.test.osgi.example.blueprint.bundle;
 
+import javax.management.MBeanServer;
+
 //$Id$
 
 /**
@@ -31,4 +33,5 @@
  */
 public interface ServiceA 
 {
+   MBeanServer getMbeanServer();
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/bundle/ServiceB.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/bundle/ServiceB.java	2009-07-22 06:02:38 UTC (rev 91539)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/bundle/ServiceB.java	2009-07-22 09:06:17 UTC (rev 91542)
@@ -19,7 +19,7 @@
  * 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.blueprint.container.bundle;
+package org.jboss.test.osgi.example.blueprint.bundle;
 
 //$Id$
 
@@ -31,4 +31,5 @@
  */
 public interface ServiceB 
 {
+   BeanA getBeanA();
 }
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/blueprint-example.xml (from rev 91539, projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/resources/container/OSGI-INF/blueprint/basic-service.xml)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/blueprint-example.xml	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/blueprint-example.xml	2009-07-22 09:06:17 UTC (rev 91542)
@@ -0,0 +1,19 @@
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+  xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+  
+  <bean id="beanA" class="org.jboss.test.osgi.example.blueprint.bundle.BeanA">
+    <property name="mbeanServer" ref="mbeanService"/>
+  </bean>
+  
+  <service id="serviceA" ref="beanA" interface="org.jboss.test.osgi.example.blueprint.bundle.ServiceA">
+  </service>
+  
+  <service id="serviceB" interface="org.jboss.test.osgi.example.blueprint.bundle.ServiceB">
+    <bean class="org.jboss.test.osgi.example.blueprint.bundle.BeanB">
+       <property name="beanA" ref="beanA"/>
+    </bean>
+  </service>
+  
+  <reference id="mbeanService" interface="javax.management.MBeanServer"/>
+
+</blueprint>
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/example-blueprint.bnd (from rev 91539, projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/resources/container/container-basic.bnd)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/example-blueprint.bnd	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/example-blueprint.bnd	2009-07-22 09:06:17 UTC (rev 91542)
@@ -0,0 +1,23 @@
+# bnd build -classpath target/test-classes -output target/test-libs/example-blueprint.jar src/test/resources/blueprint/example-blueprint.bnd
+
+Bundle-SymbolicName: example-blueprint
+
+Export-Package: org.jboss.test.osgi.example.blueprint, org.jboss.test.osgi.example.blueprint.bundle
+
+Import-Package: \
+	javax.management, \
+	org.jboss.osgi.blueprint, \
+	org.jboss.osgi.husky, \
+	org.jboss.osgi.husky.annotation, \
+	org.jboss.osgi.spi.capability, \
+	org.jboss.osgi.spi.testing, \
+	org.junit, \
+	org.osgi.framework, \
+	org.osgi.service.blueprint.* 
+
+Include-Resource: \
+	OSGI-INF/blueprint/blueprint-example.xml=blueprint-example.xml
+
+Test-Package: org.jboss.test.osgi.example.blueprint
+
+-removeheaders: Include-Resource

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/xml/jaxb/example-xml-jaxb.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/xml/jaxb/example-xml-jaxb.bnd	2009-07-22 08:26:39 UTC (rev 91541)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/xml/jaxb/example-xml-jaxb.bnd	2009-07-22 09:06:17 UTC (rev 91542)
@@ -6,7 +6,8 @@
 Export-Package: org.jboss.test.osgi.example.xml.jaxb
 
 Import-Package: com.sun.xml.bind.v2, javax.xml.bind*, javax.xml.datatype, javax.xml.namespace, \
-   org.jboss.osgi.husky*, org.jboss.osgi.jaxb, org.jboss.osgi.spi.*, org.junit, org.osgi.framework
+   org.jboss.osgi.husky*, org.jboss.osgi.jaxb, org.jboss.osgi.spi*, \
+   org.junit, org.osgi.framework
 
 Include-Resource: booking.xml, booking.xsd
 

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/xml/parser/example-xml-parser.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/xml/parser/example-xml-parser.bnd	2009-07-22 08:26:39 UTC (rev 91541)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/xml/parser/example-xml-parser.bnd	2009-07-22 09:06:17 UTC (rev 91542)
@@ -5,7 +5,7 @@
 # Export the package that contains the test case
 Export-Package: org.jboss.test.osgi.example.xml.parser
 
-Import-Package: javax.xml.parsers, org.jboss.osgi.*, org.jboss.osgi.spi.*, org.jboss.osgi.xml, \
+Import-Package: javax.xml.parsers, org.jboss.osgi.*, org.jboss.osgi.xml, \
 	org.junit, org.osgi.framework, org.w3c.dom*, org.xml.sax* 
 
 




More information about the jboss-cvs-commits mailing list