[jboss-cvs] JBossAS SVN: r99901 - in projects/jboss-osgi/trunk/testsuite/functional/src/test: java/org/jboss/test/osgi/jbosgi112 and 17 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jan 25 07:16:29 EST 2010


Author: thomas.diesler at jboss.com
Date: 2010-01-25 07:16:28 -0500 (Mon, 25 Jan 2010)
New Revision: 99901

Added:
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGi108TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGi112TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi142/OSGi142TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGi143TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGi151TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGi161TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/Activator161.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/OSGi214TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/Activator214.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGi37TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGi38TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGi39TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGi41TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGi92TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGi99TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGi36TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGi58TestCase.java
Removed:
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi142/OSGI142TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGI143TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGI151TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGI161TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGI161Activator.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/OSGI214TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/OSGI214Activator.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGI92TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGI99TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGI58TestCase.java
Modified:
   projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi161/jbosgi161-bundle.bnd
   projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi214/jbosgi214-bundle.bnd
Log:
Use OSGi prefix in test artefacts

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,179 +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.jbosgi108;
-
-//$Id: OSGI39TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.List;
-
-import org.jboss.osgi.jmx.JMXCapability;
-import org.jboss.osgi.spi.management.MBeanProxy;
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiPackageAdmin;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTestHelper;
-import org.jboss.test.osgi.jbosgi108.bundleA.SomeBeanMBean;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.osgi.framework.BundleException;
-
-/**
- * [JBOSGI-108] Investigate statics on PackageAdmin.refresh
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-108
- * 
- * @author thomas.diesler at jboss.com
- * @since 19-Jun-2009
- */
-public class OSGI108TestCase
-{
-   private static OSGiRuntime runtime;
-
-   @BeforeClass
-   public static void beforeClass() throws Exception
-   {
-      runtime = new OSGiTestHelper().getDefaultRuntime();
-      runtime.addCapability(new JMXCapability());
-   }
-
-   @AfterClass
-   public static void afterClass() throws BundleException
-   {
-      if (runtime != null)
-      {
-         runtime.shutdown();
-         runtime = null;
-      }
-   }
-
-   @Before
-   public void setUp()
-   {
-      OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
-      packageAdmin.refreshPackages(null);
-   }
-
-   @Test
-   public void testRedeploySingle() throws Exception
-   {
-      OSGiBundle bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
-
-      bundleA.start();
-
-      SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, SomeBeanMBean.MBEAN_NAME, runtime.getMBeanServer());
-      List<String> messages = report(someBean.getMessages());
-      assertEquals("Start messages", 1, messages.size());
-
-      bundleA.uninstall();
-
-      // Reinstall bundleA
-      bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
-      bundleA.start();
-
-      // The static in bundleA.SomeBean is expected to be recreated
-
-      messages = report(someBean.getMessages());
-      assertEquals("Start messages", 1, messages.size());
-
-      bundleA.uninstall();
-   }
-
-   @Test
-   public void testRedeployWithReference() throws Exception
-   {
-      OSGiBundle bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
-      OSGiBundle bundleB = runtime.installBundle("jbosgi108-bundleB.jar");
-
-      bundleA.start();
-      bundleB.start();
-
-      SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, SomeBeanMBean.MBEAN_NAME, runtime.getMBeanServer());
-      List<String> messages = report(someBean.getMessages());
-      assertEquals("Start messages", 2, messages.size());
-
-      bundleA.uninstall();
-
-      // After uninstall bundleA, bundleB still holds a reference on
-      // bundleA.SomeBean
-
-      // Reinstall bundleA
-      bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
-      bundleA.start();
-
-      // The static in bundleA.SomeBean is expected to be reused
-
-      messages = report(someBean.getMessages());
-      assertEquals("Start messages", 4, messages.size());
-
-      bundleB.uninstall();
-      bundleA.uninstall();
-   }
-
-   @Test
-   public void testRedeployWithReferenceAndRefresh() throws Exception
-   {
-      OSGiBundle bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
-      OSGiBundle bundleB = runtime.installBundle("jbosgi108-bundleB.jar");
-
-      bundleA.start();
-      bundleB.start();
-
-      SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, SomeBeanMBean.MBEAN_NAME, runtime.getMBeanServer());
-      List<String> messages = report(someBean.getMessages());
-      assertEquals("Start messages", 2, messages.size());
-
-      bundleA.uninstall();
-
-      // After uninstall bundleA, bundleB still holds a reference on
-      // bundleA.SomeBean
-
-      // Refresh all packages
-      OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
-      packageAdmin.refreshPackages(null);
-
-      // Reinstall bundleA
-      bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
-      bundleA.start();
-
-      // The static in bundleA.SomeBean is expected to be recreated
-
-      messages = report(someBean.getMessages());
-      assertEquals("Start messages", 1, messages.size());
-
-      bundleB.uninstall();
-      bundleA.uninstall();
-   }
-
-   private List<String> report(List<String> messages)
-   {
-      // System.out.println(">>>>>>>>>>>>");
-      // for (String aux : messages)
-      //    System.out.println(aux);
-      // System.out.println("<<<<<<<<<<<");
-      
-      return messages;
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGi108TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGi108TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGi108TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,179 @@
+/*
+ * 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.jbosgi108;
+
+//$Id: OSGI39TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.List;
+
+import org.jboss.osgi.jmx.JMXCapability;
+import org.jboss.osgi.spi.management.MBeanProxy;
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiPackageAdmin;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTestHelper;
+import org.jboss.test.osgi.jbosgi108.bundleA.SomeBeanMBean;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.osgi.framework.BundleException;
+
+/**
+ * [JBOSGI-108] Investigate statics on PackageAdmin.refresh
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-108
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 19-Jun-2009
+ */
+public class OSGi108TestCase
+{
+   private static OSGiRuntime runtime;
+
+   @BeforeClass
+   public static void beforeClass() throws Exception
+   {
+      runtime = new OSGiTestHelper().getDefaultRuntime();
+      runtime.addCapability(new JMXCapability());
+   }
+
+   @AfterClass
+   public static void afterClass() throws BundleException
+   {
+      if (runtime != null)
+      {
+         runtime.shutdown();
+         runtime = null;
+      }
+   }
+
+   @Before
+   public void setUp()
+   {
+      OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
+      packageAdmin.refreshPackages(null);
+   }
+
+   @Test
+   public void testRedeploySingle() throws Exception
+   {
+      OSGiBundle bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
+
+      bundleA.start();
+
+      SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, SomeBeanMBean.MBEAN_NAME, runtime.getMBeanServer());
+      List<String> messages = report(someBean.getMessages());
+      assertEquals("Start messages", 1, messages.size());
+
+      bundleA.uninstall();
+
+      // Reinstall bundleA
+      bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
+      bundleA.start();
+
+      // The static in bundleA.SomeBean is expected to be recreated
+
+      messages = report(someBean.getMessages());
+      assertEquals("Start messages", 1, messages.size());
+
+      bundleA.uninstall();
+   }
+
+   @Test
+   public void testRedeployWithReference() throws Exception
+   {
+      OSGiBundle bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
+      OSGiBundle bundleB = runtime.installBundle("jbosgi108-bundleB.jar");
+
+      bundleA.start();
+      bundleB.start();
+
+      SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, SomeBeanMBean.MBEAN_NAME, runtime.getMBeanServer());
+      List<String> messages = report(someBean.getMessages());
+      assertEquals("Start messages", 2, messages.size());
+
+      bundleA.uninstall();
+
+      // After uninstall bundleA, bundleB still holds a reference on
+      // bundleA.SomeBean
+
+      // Reinstall bundleA
+      bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
+      bundleA.start();
+
+      // The static in bundleA.SomeBean is expected to be reused
+
+      messages = report(someBean.getMessages());
+      assertEquals("Start messages", 4, messages.size());
+
+      bundleB.uninstall();
+      bundleA.uninstall();
+   }
+
+   @Test
+   public void testRedeployWithReferenceAndRefresh() throws Exception
+   {
+      OSGiBundle bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
+      OSGiBundle bundleB = runtime.installBundle("jbosgi108-bundleB.jar");
+
+      bundleA.start();
+      bundleB.start();
+
+      SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, SomeBeanMBean.MBEAN_NAME, runtime.getMBeanServer());
+      List<String> messages = report(someBean.getMessages());
+      assertEquals("Start messages", 2, messages.size());
+
+      bundleA.uninstall();
+
+      // After uninstall bundleA, bundleB still holds a reference on
+      // bundleA.SomeBean
+
+      // Refresh all packages
+      OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
+      packageAdmin.refreshPackages(null);
+
+      // Reinstall bundleA
+      bundleA = runtime.installBundle("jbosgi108-bundleA.jar");
+      bundleA.start();
+
+      // The static in bundleA.SomeBean is expected to be recreated
+
+      messages = report(someBean.getMessages());
+      assertEquals("Start messages", 1, messages.size());
+
+      bundleB.uninstall();
+      bundleA.uninstall();
+   }
+
+   private List<String> report(List<String> messages)
+   {
+      // System.out.println(">>>>>>>>>>>>");
+      // for (String aux : messages)
+      //    System.out.println(aux);
+      // System.out.println("<<<<<<<<<<<");
+      
+      return messages;
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,85 +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.jbosgi112;
-
-//$Id: OSGI39TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
-
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTest;
-import org.jboss.osgi.testing.OSGiTestHelper;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.SynchronousBundleListener;
-
-/**
- * [JBOSGI-112] Investigate Exception in SynchronousBundleListener
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-112
- * 
- * @author thomas.diesler at jboss.com
- * @since 19-Jun-2009
- */
-public class OSGI112TestCase extends OSGiTest
-{
-   private static OSGiRuntime runtime;
-
-   @BeforeClass
-   public static void beforeClass() throws BundleException
-   {
-      runtime = new OSGiTestHelper().getDefaultRuntime();
-   }
-
-   @AfterClass
-   public static void afterClass() throws BundleException
-   {
-      if (runtime != null)
-      {
-         runtime.shutdown();
-         runtime = null;
-      }
-   }
-
-   /**
-    * BundleA registers a {@link SynchronousBundleListener} which throws an exception. 
-    * Start of BundleB is started and expected to be ACTIVE.
-    */
-   @Test
-   public void testInstallBundles() throws Exception
-   {
-      OSGiBundle bundleA = runtime.installBundle("jbosgi112-bundleA.jar");
-      bundleA.start();
-
-      OSGiBundle bundleB = runtime.installBundle("jbosgi112-bundleB.jar");
-      bundleB.start();
-      
-      // Exceptions thrown from listeners are logged but otherwise ignored. 
-      // Throwing an exception from a listener will not prevent the bundle from proceeding with starting.
-      // If the BP extender detects some issue with the BP configuration, it can/should log this information 
-      // but it cannot prevent the bundle from starting.
-      
-      assertBundleState(Bundle.ACTIVE, bundleB.getState());
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGi112TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGi112TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGi112TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,85 @@
+/*
+ * 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.jbosgi112;
+
+//$Id: OSGI39TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
+
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.osgi.testing.OSGiTestHelper;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.SynchronousBundleListener;
+
+/**
+ * [JBOSGI-112] Investigate Exception in SynchronousBundleListener
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-112
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 19-Jun-2009
+ */
+public class OSGi112TestCase extends OSGiTest
+{
+   private static OSGiRuntime runtime;
+
+   @BeforeClass
+   public static void beforeClass() throws BundleException
+   {
+      runtime = new OSGiTestHelper().getDefaultRuntime();
+   }
+
+   @AfterClass
+   public static void afterClass() throws BundleException
+   {
+      if (runtime != null)
+      {
+         runtime.shutdown();
+         runtime = null;
+      }
+   }
+
+   /**
+    * BundleA registers a {@link SynchronousBundleListener} which throws an exception. 
+    * Start of BundleB is started and expected to be ACTIVE.
+    */
+   @Test
+   public void testInstallBundles() throws Exception
+   {
+      OSGiBundle bundleA = runtime.installBundle("jbosgi112-bundleA.jar");
+      bundleA.start();
+
+      OSGiBundle bundleB = runtime.installBundle("jbosgi112-bundleB.jar");
+      bundleB.start();
+      
+      // Exceptions thrown from listeners are logged but otherwise ignored. 
+      // Throwing an exception from a listener will not prevent the bundle from proceeding with starting.
+      // If the BP extender detects some issue with the BP configuration, it can/should log this information 
+      // but it cannot prevent the bundle from starting.
+      
+      assertBundleState(Bundle.ACTIVE, bundleB.getState());
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi142/OSGI142TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi142/OSGI142TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi142/OSGI142TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,94 +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.jbosgi142;
-
-//$Id: OSGI142TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
-
-
-import org.jboss.osgi.spi.framework.OSGiBootstrap;
-import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
-import org.jboss.osgi.testing.OSGiTest;
-import org.jboss.test.osgi.jbosgi142.bundleA.BeanA;
-import org.jboss.test.osgi.jbosgi142.bundleB.BeanB;
-import org.jboss.test.osgi.jbosgi142.bundleX.BeanX;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.launch.Framework;
-
-/**
- * [JBOSGI-142] Investigate classloading space
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-142
- * 
- * A imports X
- * B imports X
- * 
- * Can X load a class from A or B?
- * Can A load a class from B and vice versa?
- * 
- * @author thomas.diesler at jboss.com
- * @since 28-Aug-2009
- */
-public class OSGI142TestCase extends OSGiTest
-{
-   @Test
-   public void testLoadClass() throws Exception
-   {
-      OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
-      Framework framework = bootProvider.getFramework();
-      try
-      {
-         framework.start();
-         
-         BundleContext sysContext = framework.getBundleContext();
-         Bundle bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi142-bundleX.jar").toExternalForm());
-         bundleX.start();
-         
-         assertBundleLoadClass(bundleX, BeanX.class.getName(), true);
-         
-         Bundle bundleA = sysContext.installBundle(getTestArchiveURL("jbosgi142-bundleA.jar").toExternalForm());
-         bundleA.start();
-         
-         assertBundleLoadClass(bundleA, BeanA.class.getName(), true);
-         
-         Bundle bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi142-bundleB.jar").toExternalForm());
-         bundleB.start();
-         
-         assertBundleLoadClass(bundleB, BeanB.class.getName(), true);
-         
-         assertBundleLoadClass(bundleA, BeanX.class.getName(), true);
-         assertBundleLoadClass(bundleB, BeanX.class.getName(), true);
-    
-         assertBundleLoadClass(bundleX, BeanA.class.getName(), false);
-         assertBundleLoadClass(bundleX, BeanB.class.getName(), false);
-         
-         assertBundleLoadClass(bundleA, BeanB.class.getName(), false);
-         assertBundleLoadClass(bundleB, BeanA.class.getName(), false);
-      }
-      finally
-      {
-         framework.stop();
-         framework.waitForStop(1000);
-      }
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi142/OSGi142TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi142/OSGI142TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi142/OSGi142TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi142/OSGi142TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,94 @@
+/*
+ * 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.jbosgi142;
+
+//$Id: OSGI142TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
+
+
+import org.jboss.osgi.spi.framework.OSGiBootstrap;
+import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.test.osgi.jbosgi142.bundleA.BeanA;
+import org.jboss.test.osgi.jbosgi142.bundleB.BeanB;
+import org.jboss.test.osgi.jbosgi142.bundleX.BeanX;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.launch.Framework;
+
+/**
+ * [JBOSGI-142] Investigate classloading space
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-142
+ * 
+ * A imports X
+ * B imports X
+ * 
+ * Can X load a class from A or B?
+ * Can A load a class from B and vice versa?
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 28-Aug-2009
+ */
+public class OSGi142TestCase extends OSGiTest
+{
+   @Test
+   public void testLoadClass() throws Exception
+   {
+      OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
+      Framework framework = bootProvider.getFramework();
+      try
+      {
+         framework.start();
+         
+         BundleContext sysContext = framework.getBundleContext();
+         Bundle bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi142-bundleX.jar").toExternalForm());
+         bundleX.start();
+         
+         assertBundleLoadClass(bundleX, BeanX.class.getName(), true);
+         
+         Bundle bundleA = sysContext.installBundle(getTestArchiveURL("jbosgi142-bundleA.jar").toExternalForm());
+         bundleA.start();
+         
+         assertBundleLoadClass(bundleA, BeanA.class.getName(), true);
+         
+         Bundle bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi142-bundleB.jar").toExternalForm());
+         bundleB.start();
+         
+         assertBundleLoadClass(bundleB, BeanB.class.getName(), true);
+         
+         assertBundleLoadClass(bundleA, BeanX.class.getName(), true);
+         assertBundleLoadClass(bundleB, BeanX.class.getName(), true);
+    
+         assertBundleLoadClass(bundleX, BeanA.class.getName(), false);
+         assertBundleLoadClass(bundleX, BeanB.class.getName(), false);
+         
+         assertBundleLoadClass(bundleA, BeanB.class.getName(), false);
+         assertBundleLoadClass(bundleB, BeanA.class.getName(), false);
+      }
+      finally
+      {
+         framework.stop();
+         framework.waitForStop(1000);
+      }
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGI143TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGI143TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGI143TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,107 +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.jbosgi143;
-
-//$Id: OSGI143TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import org.jboss.osgi.spi.framework.OSGiBootstrap;
-import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
-import org.jboss.osgi.testing.OSGiTest;
-import org.jboss.test.osgi.jbosgi143.bundleA.BeanA;
-import org.jboss.test.osgi.jbosgi143.bundleX.BeanX;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.launch.Framework;
-
-/**
- * [JBOSGI-143] Add initial support for DynamicImport-Package
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-143
- * 
- * A imports X
- * X has DynamicImport-Package: *
- * 
- * Can X load a class from A?
- * 
- * @author thomas.diesler at jboss.com
- * @since 28-Aug-2009
- */
-public class OSGI143TestCase extends OSGiTest
-{
-   @Test
-   public void testLoadClass() throws Exception
-   {
-      OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
-      Framework framework = bootProvider.getFramework();
-      framework.start();
-      
-      try
-      {
-         BundleContext sysContext = framework.getBundleContext();
-         Bundle bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi143-bundleX.jar").toExternalForm());
-         bundleX.start();
-         
-         assertBundleLoadClass(bundleX, BeanX.class, true);
-         
-         Bundle bundleA = sysContext.installBundle(getTestArchiveURL("jbosgi143-bundleA.jar").toExternalForm());
-         bundleA.start();
-         
-         assertBundleLoadClass(bundleA, BeanA.class, true);
-         
-         assertBundleLoadClass(bundleA, BeanX.class, true);
-         assertBundleLoadClass(bundleX, BeanA.class, true);
-      }
-      finally
-      {
-         framework.stop();
-         framework.waitForStop(1000);
-      }
-   }
-
-   private void assertBundleLoadClass(Bundle bundle, Class<?> expClazz, boolean success) 
-   {
-      String message = bundle.getSymbolicName() + " loads " + expClazz.getName();
-      
-      Class<?> wasClass;
-      try
-      {
-         wasClass = bundle.loadClass(expClazz.getName());
-         if (success)
-         {
-            assertEquals(message, expClazz.getName(), wasClass.getName());
-         }
-         else
-         {
-            fail("ClassNotFoundException expected for: " + message);
-         }
-      }
-      catch (ClassNotFoundException ex)
-      {
-         if (success)
-            fail("Unexpected ClassNotFoundException for: " + message);
-      }
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGi143TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGI143TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGi143TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGi143TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,107 @@
+/*
+ * 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.jbosgi143;
+
+//$Id: OSGI143TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import org.jboss.osgi.spi.framework.OSGiBootstrap;
+import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.test.osgi.jbosgi143.bundleA.BeanA;
+import org.jboss.test.osgi.jbosgi143.bundleX.BeanX;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.launch.Framework;
+
+/**
+ * [JBOSGI-143] Add initial support for DynamicImport-Package
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-143
+ * 
+ * A imports X
+ * X has DynamicImport-Package: *
+ * 
+ * Can X load a class from A?
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 28-Aug-2009
+ */
+public class OSGi143TestCase extends OSGiTest
+{
+   @Test
+   public void testLoadClass() throws Exception
+   {
+      OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
+      Framework framework = bootProvider.getFramework();
+      framework.start();
+      
+      try
+      {
+         BundleContext sysContext = framework.getBundleContext();
+         Bundle bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi143-bundleX.jar").toExternalForm());
+         bundleX.start();
+         
+         assertBundleLoadClass(bundleX, BeanX.class, true);
+         
+         Bundle bundleA = sysContext.installBundle(getTestArchiveURL("jbosgi143-bundleA.jar").toExternalForm());
+         bundleA.start();
+         
+         assertBundleLoadClass(bundleA, BeanA.class, true);
+         
+         assertBundleLoadClass(bundleA, BeanX.class, true);
+         assertBundleLoadClass(bundleX, BeanA.class, true);
+      }
+      finally
+      {
+         framework.stop();
+         framework.waitForStop(1000);
+      }
+   }
+
+   private void assertBundleLoadClass(Bundle bundle, Class<?> expClazz, boolean success) 
+   {
+      String message = bundle.getSymbolicName() + " loads " + expClazz.getName();
+      
+      Class<?> wasClass;
+      try
+      {
+         wasClass = bundle.loadClass(expClazz.getName());
+         if (success)
+         {
+            assertEquals(message, expClazz.getName(), wasClass.getName());
+         }
+         else
+         {
+            fail("ClassNotFoundException expected for: " + message);
+         }
+      }
+      catch (ClassNotFoundException ex)
+      {
+         if (success)
+            fail("Unexpected ClassNotFoundException for: " + message);
+      }
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGI151TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGI151TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGI151TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,167 +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.jbosgi151;
-
-import static org.junit.Assert.assertEquals;
-
-import org.jboss.osgi.spi.framework.OSGiBootstrap;
-import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
-import org.jboss.osgi.testing.OSGiTest;
-import org.jboss.test.osgi.jbosgi151.bundleA.BeanA;
-import org.jboss.test.osgi.jbosgi151.bundleB.BeanB;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.launch.Framework;
-
-/**
- * [JBOSGI-151] Cannot resolve circular dependencies
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-151
- * 
- * BundleA 
- *  exports A
- *  imports B
- *  
- * BundleB 
- *  exports B
- *  imports A
- *  
- * BundleC 
- *  exports A, B
- *  imports A
- * 
- * BundleD 
- *  exports A,
- *  imports A, B
- * 
- * @author thomas.diesler at jboss.com
- * @since 07-Sep-2009
- */
-public class OSGI151TestCase extends OSGiTest
-{
-   private static Framework framework;
-   
-   @BeforeClass
-   public static void beforeClass() throws Exception
-   {
-      OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
-      framework = bootProvider.getFramework();
-      framework.start();
-   }
-   
-   @AfterClass
-   public static void afterClass() throws Exception
-   {
-      if (framework != null)
-      {
-         framework.stop();
-         framework.waitForStop(2000);
-         framework = null;
-      }
-   }
-   
-   @Test
-   @Ignore
-   public void testCircularNoSelfDependency() throws Exception
-   {
-      BundleContext sysContext = framework.getBundleContext();
-      
-      Bundle bundleA = sysContext.installBundle(getTestArchiveURL("jbosgi151-bundleA.jar").toExternalForm());
-      assertBundleState(Bundle.INSTALLED, bundleA.getState());
-
-      Bundle bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi151-bundleB.jar").toExternalForm());
-      assertBundleState(Bundle.INSTALLED, bundleB.getState());
-      
-      bundleB.start();
-      assertBundleState(Bundle.ACTIVE, bundleB.getState());
-      assertBundleState(Bundle.RESOLVED, bundleA.getState());
-      
-      Class<?> classAA = bundleA.loadClass(BeanA.class.getName());
-      Class<?> classAB = bundleB.loadClass(BeanA.class.getName());
-      assertEquals("Class for BeanA", classAA, classAB);
-      
-      Class<?> classBA = bundleA.loadClass(BeanB.class.getName());
-      Class<?> classBB = bundleB.loadClass(BeanB.class.getName());
-      assertEquals("Class for BeanB", classBA, classBB);
-      
-      bundleB.uninstall();
-      bundleA.uninstall();
-   }
-
-   @Test
-   public void testCircularInstallCbeforeD() throws Exception
-   {
-      BundleContext sysContext = framework.getBundleContext();
-      
-      Bundle bundleC = sysContext.installBundle(getTestArchiveURL("jbosgi151-bundleC.jar").toExternalForm());
-      assertBundleState(Bundle.INSTALLED, bundleC.getState());
-
-      Bundle bundleD = sysContext.installBundle(getTestArchiveURL("jbosgi151-bundleD.jar").toExternalForm());
-      assertBundleState(Bundle.INSTALLED, bundleD.getState());
-      
-      bundleD.start();
-      assertBundleState(Bundle.ACTIVE, bundleD.getState());
-      assertBundleState(Bundle.RESOLVED, bundleC.getState());
-      
-      Class<?> classBC = bundleC.loadClass(BeanB.class.getName());
-      Class<?> classBD = bundleD.loadClass(BeanB.class.getName());
-      assertEquals("Class for BeanB", classBC, classBD);
-      
-      Class<?> classAC = bundleC.loadClass(BeanA.class.getName());
-      Class<?> classAD = bundleD.loadClass(BeanA.class.getName());
-      assertEquals("Class for BeanA", classAC, classAD);
-      
-      bundleD.uninstall();
-      bundleC.uninstall();
-   }
-
-   @Test
-   public void testCircularInstallDbeforeC() throws Exception
-   {
-      BundleContext sysContext = framework.getBundleContext();
-      
-      Bundle bundleD = sysContext.installBundle(getTestArchiveURL("jbosgi151-bundleD.jar").toExternalForm());
-      assertBundleState(Bundle.INSTALLED, bundleD.getState());
-      
-      Bundle bundleC = sysContext.installBundle(getTestArchiveURL("jbosgi151-bundleC.jar").toExternalForm());
-      assertBundleState(Bundle.INSTALLED, bundleC.getState());
-
-      bundleD.start();
-      assertBundleState(Bundle.ACTIVE, bundleD.getState());
-      assertBundleState(Bundle.RESOLVED, bundleC.getState());
-      
-      Class<?> classBC = bundleC.loadClass(BeanB.class.getName());
-      Class<?> classBD = bundleD.loadClass(BeanB.class.getName());
-      assertEquals("Class for BeanB", classBC, classBD);
-      
-      Class<?> classAC = bundleC.loadClass(BeanA.class.getName());
-      Class<?> classAD = bundleD.loadClass(BeanA.class.getName());
-      assertEquals("Class for BeanA", classAC, classAD);
-      
-      bundleD.uninstall();
-      bundleC.uninstall();
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGi151TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGI151TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGi151TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGi151TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,167 @@
+/*
+ * 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.jbosgi151;
+
+import static org.junit.Assert.assertEquals;
+
+import org.jboss.osgi.spi.framework.OSGiBootstrap;
+import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.test.osgi.jbosgi151.bundleA.BeanA;
+import org.jboss.test.osgi.jbosgi151.bundleB.BeanB;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.launch.Framework;
+
+/**
+ * [JBOSGI-151] Cannot resolve circular dependencies
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-151
+ * 
+ * BundleA 
+ *  exports A
+ *  imports B
+ *  
+ * BundleB 
+ *  exports B
+ *  imports A
+ *  
+ * BundleC 
+ *  exports A, B
+ *  imports A
+ * 
+ * BundleD 
+ *  exports A,
+ *  imports A, B
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 07-Sep-2009
+ */
+public class OSGi151TestCase extends OSGiTest
+{
+   private static Framework framework;
+   
+   @BeforeClass
+   public static void beforeClass() throws Exception
+   {
+      OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
+      framework = bootProvider.getFramework();
+      framework.start();
+   }
+   
+   @AfterClass
+   public static void afterClass() throws Exception
+   {
+      if (framework != null)
+      {
+         framework.stop();
+         framework.waitForStop(2000);
+         framework = null;
+      }
+   }
+   
+   @Test
+   @Ignore
+   public void testCircularNoSelfDependency() throws Exception
+   {
+      BundleContext sysContext = framework.getBundleContext();
+      
+      Bundle bundleA = sysContext.installBundle(getTestArchiveURL("jbosgi151-bundleA.jar").toExternalForm());
+      assertBundleState(Bundle.INSTALLED, bundleA.getState());
+
+      Bundle bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi151-bundleB.jar").toExternalForm());
+      assertBundleState(Bundle.INSTALLED, bundleB.getState());
+      
+      bundleB.start();
+      assertBundleState(Bundle.ACTIVE, bundleB.getState());
+      assertBundleState(Bundle.RESOLVED, bundleA.getState());
+      
+      Class<?> classAA = bundleA.loadClass(BeanA.class.getName());
+      Class<?> classAB = bundleB.loadClass(BeanA.class.getName());
+      assertEquals("Class for BeanA", classAA, classAB);
+      
+      Class<?> classBA = bundleA.loadClass(BeanB.class.getName());
+      Class<?> classBB = bundleB.loadClass(BeanB.class.getName());
+      assertEquals("Class for BeanB", classBA, classBB);
+      
+      bundleB.uninstall();
+      bundleA.uninstall();
+   }
+
+   @Test
+   public void testCircularInstallCbeforeD() throws Exception
+   {
+      BundleContext sysContext = framework.getBundleContext();
+      
+      Bundle bundleC = sysContext.installBundle(getTestArchiveURL("jbosgi151-bundleC.jar").toExternalForm());
+      assertBundleState(Bundle.INSTALLED, bundleC.getState());
+
+      Bundle bundleD = sysContext.installBundle(getTestArchiveURL("jbosgi151-bundleD.jar").toExternalForm());
+      assertBundleState(Bundle.INSTALLED, bundleD.getState());
+      
+      bundleD.start();
+      assertBundleState(Bundle.ACTIVE, bundleD.getState());
+      assertBundleState(Bundle.RESOLVED, bundleC.getState());
+      
+      Class<?> classBC = bundleC.loadClass(BeanB.class.getName());
+      Class<?> classBD = bundleD.loadClass(BeanB.class.getName());
+      assertEquals("Class for BeanB", classBC, classBD);
+      
+      Class<?> classAC = bundleC.loadClass(BeanA.class.getName());
+      Class<?> classAD = bundleD.loadClass(BeanA.class.getName());
+      assertEquals("Class for BeanA", classAC, classAD);
+      
+      bundleD.uninstall();
+      bundleC.uninstall();
+   }
+
+   @Test
+   public void testCircularInstallDbeforeC() throws Exception
+   {
+      BundleContext sysContext = framework.getBundleContext();
+      
+      Bundle bundleD = sysContext.installBundle(getTestArchiveURL("jbosgi151-bundleD.jar").toExternalForm());
+      assertBundleState(Bundle.INSTALLED, bundleD.getState());
+      
+      Bundle bundleC = sysContext.installBundle(getTestArchiveURL("jbosgi151-bundleC.jar").toExternalForm());
+      assertBundleState(Bundle.INSTALLED, bundleC.getState());
+
+      bundleD.start();
+      assertBundleState(Bundle.ACTIVE, bundleD.getState());
+      assertBundleState(Bundle.RESOLVED, bundleC.getState());
+      
+      Class<?> classBC = bundleC.loadClass(BeanB.class.getName());
+      Class<?> classBD = bundleD.loadClass(BeanB.class.getName());
+      assertEquals("Class for BeanB", classBC, classBD);
+      
+      Class<?> classAC = bundleC.loadClass(BeanA.class.getName());
+      Class<?> classAD = bundleD.loadClass(BeanA.class.getName());
+      assertEquals("Class for BeanA", classAC, classAD);
+      
+      bundleD.uninstall();
+      bundleC.uninstall();
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGI161TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGI161TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGI161TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,62 +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.jbosgi161;
-
-//$Id:$
-
-import org.jboss.osgi.spi.capability.LogServiceCapability;
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTest;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-
-/**
- * [JBOSGI-161] Cannot use commons logging
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-161
- * 
- * @author thomas.diesler at jboss.com
- * @since 07-Oct-2009
- */
-public class OSGI161TestCase extends OSGiTest
-{
-   @Test
-   public void testLogging() throws Exception
-   {
-      OSGiRuntime runtime = getDefaultRuntime();
-      try
-      {
-         runtime.addCapability(new LogServiceCapability());
-         
-         OSGiBundle bundleA = runtime.installBundle("jbosgi161-bundle.jar");
-         bundleA.start();
-         
-         assertBundleState(Bundle.ACTIVE, bundleA.getState());
-         bundleA.uninstall();
-      }
-      finally
-      {
-         runtime.shutdown();
-      }
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGi161TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGI161TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGi161TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGi161TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,62 @@
+/*
+ * 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.jbosgi161;
+
+//$Id:$
+
+import org.jboss.osgi.spi.capability.LogServiceCapability;
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTest;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+/**
+ * [JBOSGI-161] Cannot use commons logging
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-161
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 07-Oct-2009
+ */
+public class OSGi161TestCase extends OSGiTest
+{
+   @Test
+   public void testLogging() throws Exception
+   {
+      OSGiRuntime runtime = getDefaultRuntime();
+      try
+      {
+         runtime.addCapability(new LogServiceCapability());
+         
+         OSGiBundle bundleA = runtime.installBundle("jbosgi161-bundle.jar");
+         bundleA.start();
+         
+         assertBundleState(Bundle.ACTIVE, bundleA.getState());
+         bundleA.uninstall();
+      }
+      finally
+      {
+         runtime.shutdown();
+      }
+   }
+}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/Activator161.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGI161Activator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/Activator161.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/Activator161.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,86 @@
+/*
+ * 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.jbosgi161.bundle;
+
+// $Id:$
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Activator161 implements BundleActivator
+{
+   public void start(BundleContext context) throws Exception
+   {
+      assertCommonsLogging(context);
+      
+      assertSL4J(context);
+   }
+
+   public void stop(BundleContext context) throws Exception
+   {
+   }
+
+   private void assertCommonsLogging(BundleContext context)
+   {
+      Log log = LogFactory.getLog(Activator161.class);
+
+      String loggerClass = log.getClass().getName();
+      
+      List<String> expected = new ArrayList<String>();
+      expected.add("org.apache.commons.logging.impl.SLF4JLog");
+      expected.add("org.apache.commons.logging.impl.Log4JLogger");
+      expected.add("org.apache.commons.logging.impl.SLF4JLocationAwareLog");
+      
+      if (expected.contains(loggerClass) == false)
+         throw new IllegalStateException("Unexpected logger: " + loggerClass);
+      
+      log.info("*******************************************");
+      log.info("* jcl: " + context.getBundle());
+      log.info("*******************************************");
+   }
+
+   private void assertSL4J(BundleContext context)
+   {
+      Logger log = LoggerFactory.getLogger(Activator161.class);
+
+      String loggerClass = log.getClass().getName();
+
+      List<String> expected = new ArrayList<String>();
+      expected.add("org.jboss.slf4j.JBossLoggerAdapter");
+      expected.add("org.slf4j.impl.Log4jLoggerAdapter");
+      expected.add("org.slf4j.impl.Slf4jLogger");
+      
+      if (expected.contains(loggerClass) == false)
+         throw new IllegalStateException("Unexpected logger: " + loggerClass);
+      
+      log.info("*******************************************");
+      log.info("* slf4j: " + context.getBundle());
+      log.info("*******************************************");
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGI161Activator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGI161Activator.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGI161Activator.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,86 +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.jbosgi161.bundle;
-
-// $Id:$
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class OSGI161Activator implements BundleActivator
-{
-   public void start(BundleContext context) throws Exception
-   {
-      assertCommonsLogging(context);
-      
-      assertSL4J(context);
-   }
-
-   public void stop(BundleContext context) throws Exception
-   {
-   }
-
-   private void assertCommonsLogging(BundleContext context)
-   {
-      Log log = LogFactory.getLog(OSGI161Activator.class);
-
-      String loggerClass = log.getClass().getName();
-      
-      List<String> expected = new ArrayList<String>();
-      expected.add("org.apache.commons.logging.impl.SLF4JLog");
-      expected.add("org.apache.commons.logging.impl.Log4JLogger");
-      expected.add("org.apache.commons.logging.impl.SLF4JLocationAwareLog");
-      
-      if (expected.contains(loggerClass) == false)
-         throw new IllegalStateException("Unexpected logger: " + loggerClass);
-      
-      log.info("*******************************************");
-      log.info("* jcl: " + context.getBundle());
-      log.info("*******************************************");
-   }
-
-   private void assertSL4J(BundleContext context)
-   {
-      Logger log = LoggerFactory.getLogger(OSGI161Activator.class);
-
-      String loggerClass = log.getClass().getName();
-
-      List<String> expected = new ArrayList<String>();
-      expected.add("org.jboss.slf4j.JBossLoggerAdapter");
-      expected.add("org.slf4j.impl.Log4jLoggerAdapter");
-      expected.add("org.slf4j.impl.Slf4jLogger");
-      
-      if (expected.contains(loggerClass) == false)
-         throw new IllegalStateException("Unexpected logger: " + loggerClass);
-      
-      log.info("*******************************************");
-      log.info("* slf4j: " + context.getBundle());
-      log.info("*******************************************");
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/OSGI214TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/OSGI214TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/OSGI214TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,126 +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.jbosgi214;
-
-//$Id$
-
-import static org.junit.Assert.assertNotNull;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.osgi.spi.util.ServiceLoader;
-import org.jboss.osgi.testing.OSGiTest;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.launch.Framework;
-import org.osgi.framework.launch.FrameworkFactory;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * [JBOSGI-214] Cannot repeatedly register service bound to an interface from the system classpath
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-214
- * 
- * @author thomas.diesler at jboss.com
- * @since 03-Dec-2009
- */
-public class OSGI214TestCase extends OSGiTest
-{
-   @Test
-   public void testFirstRun() throws Exception
-   {
-      runSystemServiceTest();
-   }
-
-   @Test
-   public void testSecondRun() throws Exception
-   {
-      runSystemServiceTest();
-   }
-   
-   private void runSystemServiceTest() throws BundleException, InterruptedException
-   {
-      // Setup some package on the system classpath
-      Map<String, String> props = new HashMap<String, String>();
-      props.put("org.osgi.framework.system.packages.extra", SomeService.class.getPackage().getName());
-      props.put("felix.bootdelegation.implicit", "false");
-      
-      // Bootstrap and start the framework
-      FrameworkFactory factory = ServiceLoader.loadService(FrameworkFactory.class);
-      Framework framework = factory.newFramework(props);
-      framework.start();
-      
-      // Start the ServiceTracker
-      BundleContext context = framework.getBundleContext();
-      new SomeServiceTracker(context).open();
-      
-      try
-      {
-         // Install and start the test bundle
-         URL bundleURL = getTestArchiveURL("jbosgi214-bundle.jar");
-         Bundle bundle = context.installBundle(bundleURL.toExternalForm());
-         bundle.start();
-         
-         // Verify that the service is there and can be cast to an interface from the system classpath
-         ServiceReference sref = context.getServiceReference(SomeService.class.getName());
-         SomeService service = (SomeService)context.getService(sref);
-         assertNotNull("Service not null", service);
-
-         // Uninstall the test bundle
-         bundle.uninstall();
-      }
-      finally
-      {
-         // Stop the framework
-         framework.stop();
-         framework.waitForStop(5000);
-      }
-   }
-   
-   class SomeServiceTracker extends ServiceTracker
-   {
-      public SomeServiceTracker(BundleContext context)
-      {
-         super(context, SomeService.class.getName(), null);
-      }
-
-      @Override
-      public Object addingService(ServiceReference sref)
-      {
-         Object serviceObj = super.addingService(sref);
-         //System.out.println("addingService: " + serviceObj);
-         return (SomeService)serviceObj;
-      }
-
-      @Override
-      public void removedService(ServiceReference reference, Object serviceObj)
-      {
-         //System.out.println("removedService: " + serviceObj);
-         super.removedService(reference, serviceObj);
-      }
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/OSGi214TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/OSGI214TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/OSGi214TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/OSGi214TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,126 @@
+/*
+ * 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.jbosgi214;
+
+//$Id$
+
+import static org.junit.Assert.assertNotNull;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.osgi.spi.util.ServiceLoader;
+import org.jboss.osgi.testing.OSGiTest;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.launch.Framework;
+import org.osgi.framework.launch.FrameworkFactory;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * [JBOSGI-214] Cannot repeatedly register service bound to an interface from the system classpath
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-214
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 03-Dec-2009
+ */
+public class OSGi214TestCase extends OSGiTest
+{
+   @Test
+   public void testFirstRun() throws Exception
+   {
+      runSystemServiceTest();
+   }
+
+   @Test
+   public void testSecondRun() throws Exception
+   {
+      runSystemServiceTest();
+   }
+   
+   private void runSystemServiceTest() throws BundleException, InterruptedException
+   {
+      // Setup some package on the system classpath
+      Map<String, String> props = new HashMap<String, String>();
+      props.put("org.osgi.framework.system.packages.extra", SomeService.class.getPackage().getName());
+      props.put("felix.bootdelegation.implicit", "false");
+      
+      // Bootstrap and start the framework
+      FrameworkFactory factory = ServiceLoader.loadService(FrameworkFactory.class);
+      Framework framework = factory.newFramework(props);
+      framework.start();
+      
+      // Start the ServiceTracker
+      BundleContext context = framework.getBundleContext();
+      new SomeServiceTracker(context).open();
+      
+      try
+      {
+         // Install and start the test bundle
+         URL bundleURL = getTestArchiveURL("jbosgi214-bundle.jar");
+         Bundle bundle = context.installBundle(bundleURL.toExternalForm());
+         bundle.start();
+         
+         // Verify that the service is there and can be cast to an interface from the system classpath
+         ServiceReference sref = context.getServiceReference(SomeService.class.getName());
+         SomeService service = (SomeService)context.getService(sref);
+         assertNotNull("Service not null", service);
+
+         // Uninstall the test bundle
+         bundle.uninstall();
+      }
+      finally
+      {
+         // Stop the framework
+         framework.stop();
+         framework.waitForStop(5000);
+      }
+   }
+   
+   class SomeServiceTracker extends ServiceTracker
+   {
+      public SomeServiceTracker(BundleContext context)
+      {
+         super(context, SomeService.class.getName(), null);
+      }
+
+      @Override
+      public Object addingService(ServiceReference sref)
+      {
+         Object serviceObj = super.addingService(sref);
+         //System.out.println("addingService: " + serviceObj);
+         return (SomeService)serviceObj;
+      }
+
+      @Override
+      public void removedService(ServiceReference reference, Object serviceObj)
+      {
+         //System.out.println("removedService: " + serviceObj);
+         super.removedService(reference, serviceObj);
+      }
+   }
+}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/Activator214.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/OSGI214Activator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/Activator214.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/Activator214.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -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.jbosgi214.bundle;
+
+//$Id$
+
+import org.jboss.test.osgi.jbosgi214.SomeService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * A Service Activator
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 24-Apr-2009
+ */
+public class Activator214 implements BundleActivator
+{
+   public void start(BundleContext context)
+   {
+      // Register a service that is bound to an interface from the system classpath
+      context.registerService(SomeService.class.getName(), new SomeServiceImpl(), null);
+   }
+
+   public void stop(BundleContext context)
+   {
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/OSGI214Activator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/OSGI214Activator.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/OSGI214Activator.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,47 +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.jbosgi214.bundle;
-
-//$Id$
-
-import org.jboss.test.osgi.jbosgi214.SomeService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * A Service Activator
- * 
- * @author thomas.diesler at jboss.com
- * @since 24-Apr-2009
- */
-public class OSGI214Activator implements BundleActivator
-{
-   public void start(BundleContext context)
-   {
-      // Register a service that is bound to an interface from the system classpath
-      context.registerService(SomeService.class.getName(), new SomeServiceImpl(), null);
-   }
-
-   public void stop(BundleContext context)
-   {
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,79 +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.jbosgi37;
-
-//$Id: OSGI37TestCase.java 87351 2009-04-15 14:25:32Z thomas.diesler at jboss.com $
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.osgi.spi.capability.CompendiumCapability;
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTest;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-
-/**
- * [JBOSGI-37] Prevent creation of deployment unit for nested jars
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-37
- * 
- * @author thomas.diesler at jboss.com
- * @since 09-Apr-2009
- */
-public class OSGI37TestCase extends OSGiTest
-{
-   @Test
-   public void testNestedBundle() throws Exception
-   {
-      OSGiRuntime runtime = getDefaultRuntime();
-      try
-      {
-         runtime.addCapability(new CompendiumCapability());
-         
-         OSGiBundle bundleA = runtime.installBundle("jbosgi37-bundleA.jar");
-         bundleA.start();
-         
-         assertBundleState(Bundle.ACTIVE, bundleA.getState());
-         
-         List<String> relevant = new ArrayList<String>();
-         for (OSGiBundle bundle : runtime.getBundles())
-         {
-            String symbolicName = bundle.getSymbolicName();
-            if (symbolicName.startsWith("jbosgi37"))
-               relevant.add(symbolicName);
-         }
-
-         assertEquals("No Sub Bundle", 1, relevant.size());
-         assertEquals("jbosgi37-bundleA", relevant.get(0));
-         
-         bundleA.uninstall();
-      }
-      finally
-      {
-         runtime.shutdown();
-      }
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGi37TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGi37TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGi37TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,79 @@
+/*
+ * 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.jbosgi37;
+
+//$Id: OSGI37TestCase.java 87351 2009-04-15 14:25:32Z thomas.diesler at jboss.com $
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.osgi.spi.capability.CompendiumCapability;
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTest;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+/**
+ * [JBOSGI-37] Prevent creation of deployment unit for nested jars
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-37
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 09-Apr-2009
+ */
+public class OSGi37TestCase extends OSGiTest
+{
+   @Test
+   public void testNestedBundle() throws Exception
+   {
+      OSGiRuntime runtime = getDefaultRuntime();
+      try
+      {
+         runtime.addCapability(new CompendiumCapability());
+         
+         OSGiBundle bundleA = runtime.installBundle("jbosgi37-bundleA.jar");
+         bundleA.start();
+         
+         assertBundleState(Bundle.ACTIVE, bundleA.getState());
+         
+         List<String> relevant = new ArrayList<String>();
+         for (OSGiBundle bundle : runtime.getBundles())
+         {
+            String symbolicName = bundle.getSymbolicName();
+            if (symbolicName.startsWith("jbosgi37"))
+               relevant.add(symbolicName);
+         }
+
+         assertEquals("No Sub Bundle", 1, relevant.size());
+         assertEquals("jbosgi37-bundleA", relevant.get(0));
+         
+         bundleA.uninstall();
+      }
+      finally
+      {
+         runtime.shutdown();
+      }
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,272 +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.jbosgi38;
-
-//$Id: OSGI38TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
-
-import static org.junit.Assert.fail;
-
-import org.jboss.osgi.spi.capability.CompendiumCapability;
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTest;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleException;
-
-/**
- * [JBOSGI-38] Investigate bundle install/start behaviour with random deployment order
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-38
- * 
- * Bundle A depends on bundle B, both share bundle X.
- * 
- * A ---> B 
- * A ---> X <--- B
- * 
- * [TODO] Use default runtime for in container testing
- * 
- * @author thomas.diesler at jboss.com
- * @since 02-Mar-2009
- */
-public class OSGI38TestCase extends OSGiTest
-{
-   @Test
-   public void testInstallStartX() throws Exception
-   {
-      OSGiRuntime runtime = getEmbeddedRuntime();
-      try
-      {
-         runtime.addCapability(new CompendiumCapability());
-         
-         OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
-         assertBundleState(Bundle.INSTALLED, bundleX.getState());
-
-         bundleX.start();
-         assertBundleState(Bundle.ACTIVE, bundleX.getState());
-         
-         bundleX.uninstall();
-         assertBundleState(Bundle.UNINSTALLED, bundleX.getState());
-      }
-      finally
-      {
-         runtime.shutdown();
-      }
-   }
-
-   /*
-    * Install X, B
-    */
-   @Test
-   public void testInstallXBeforeB() throws Exception
-   {
-      OSGiRuntime runtime = getEmbeddedRuntime();
-      try
-      {
-         runtime.addCapability(new CompendiumCapability());
-         
-         OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
-         assertBundleState(Bundle.INSTALLED, bundleX.getState());
-
-         OSGiBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
-         assertBundleState(Bundle.INSTALLED, bundleB.getState());
-
-         bundleB.start();
-         assertBundleState(Bundle.RESOLVED, bundleX.getState());
-         assertBundleState(Bundle.ACTIVE, bundleB.getState());
-         
-         bundleB.uninstall();
-         bundleX.uninstall();
-      }
-      finally
-      {
-         runtime.shutdown();
-      }
-   }
-
-   /*
-    * Install X, B, A
-    */
-   @Test
-   public void testInstallBBeforeA() throws Exception
-   {
-      OSGiRuntime runtime = getEmbeddedRuntime();
-      try
-      {
-         runtime.addCapability(new CompendiumCapability());
-         
-         OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
-         assertBundleState(Bundle.INSTALLED, bundleX.getState());
-
-         OSGiBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
-         assertBundleState(Bundle.INSTALLED, bundleB.getState());
-
-         OSGiBundle bundleA = runtime.installBundle("jbosgi38-bundleA.jar");
-         assertBundleState(Bundle.INSTALLED, bundleA.getState());
-
-         bundleA.start();
-         assertBundleState(Bundle.RESOLVED, bundleX.getState());
-         assertBundleState(Bundle.RESOLVED, bundleB.getState());
-         assertBundleState(Bundle.ACTIVE, bundleA.getState());
-         
-         bundleA.uninstall();
-         bundleB.uninstall();
-         bundleX.uninstall();
-      }
-      finally
-      {
-         runtime.shutdown();
-      }
-   }
-
-   /*
-    * Install B, X
-    */
-   @Test
-   public void testInstallBBeforeX() throws Exception
-   {
-      OSGiRuntime runtime = getEmbeddedRuntime();
-      try
-      {
-         runtime.addCapability(new CompendiumCapability());
-         
-         OSGiBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
-         assertBundleState(Bundle.INSTALLED, bundleB.getState());
-
-         try
-         {
-            bundleB.start();
-            fail("Unresolved constraint expected");
-         }
-         catch (BundleException ex)
-         {
-            // expected
-         }
-
-         OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
-         assertBundleState(Bundle.INSTALLED, bundleX.getState());
-
-         bundleB.start();
-         assertBundleState(Bundle.RESOLVED, bundleX.getState());
-         assertBundleState(Bundle.ACTIVE, bundleB.getState());
-
-         bundleB.uninstall();
-         bundleX.uninstall();
-      }
-      finally
-      {
-         runtime.shutdown();
-      }
-   }
-
-   /*
-    * Install A, B, X
-    */
-   @Test
-   public void testInstallABeforeB() throws Exception
-   {
-      OSGiRuntime runtime = getEmbeddedRuntime();
-      try
-      {
-         runtime.addCapability(new CompendiumCapability());
-         
-         OSGiBundle bundleA = runtime.installBundle("jbosgi38-bundleA.jar");
-         assertBundleState(Bundle.INSTALLED, bundleA.getState());
-
-         OSGiBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
-         assertBundleState(Bundle.INSTALLED, bundleB.getState());
-
-         try
-         {
-            bundleB.start();
-            fail("Unresolved constraint expected");
-         }
-         catch (BundleException ex)
-         {
-            // expected
-         }
-
-         OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
-         assertBundleState(Bundle.INSTALLED, bundleX.getState());
-
-         bundleB.start();
-         assertBundleState(Bundle.RESOLVED, bundleX.getState());
-         assertBundleState(Bundle.ACTIVE, bundleB.getState());
-         
-         bundleA.start();
-         assertBundleState(Bundle.ACTIVE, bundleA.getState());
-
-         bundleA.uninstall();
-         bundleB.uninstall();
-         bundleX.uninstall();
-      }
-      finally
-      {
-         runtime.shutdown();
-      }
-   }
-
-   /*
-    * Uninstall X, B stays active
-    */
-   @Test
-   public void testUninstallX() throws Exception
-   {
-      if ("jbossmc".equals(getFramework()))
-      {
-         System.out.println("FIXME [JBOSGI-213] Unexpected dependee state changes");
-         return;
-      }
-         
-      OSGiRuntime runtime = getEmbeddedRuntime();
-      try
-      {
-         runtime.addCapability(new CompendiumCapability());
-         
-         OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
-         assertBundleState(Bundle.INSTALLED, bundleX.getState());
-
-         OSGiBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
-         assertBundleState(Bundle.INSTALLED, bundleB.getState());
-
-         bundleB.start();
-         assertBundleState(Bundle.RESOLVED, bundleX.getState());
-         assertBundleState(Bundle.ACTIVE, bundleB.getState());
-         
-         bundleX.stop();
-         assertBundleState(Bundle.RESOLVED, bundleX.getState());
-         assertBundleState(Bundle.ACTIVE, bundleB.getState());
-         
-         bundleX.uninstall();
-         assertBundleState(Bundle.UNINSTALLED, bundleX.getState());
-         assertBundleState(Bundle.ACTIVE, bundleB.getState());
-         
-         bundleB.uninstall();
-         assertBundleState(Bundle.UNINSTALLED, bundleB.getState());
-      }
-      finally
-      {
-         runtime.shutdown();
-      }
-   }
-
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGi38TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGi38TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGi38TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,272 @@
+/*
+ * 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.jbosgi38;
+
+//$Id: OSGI38TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
+
+import static org.junit.Assert.fail;
+
+import org.jboss.osgi.spi.capability.CompendiumCapability;
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTest;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+
+/**
+ * [JBOSGI-38] Investigate bundle install/start behaviour with random deployment order
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-38
+ * 
+ * Bundle A depends on bundle B, both share bundle X.
+ * 
+ * A ---> B 
+ * A ---> X <--- B
+ * 
+ * [TODO] Use default runtime for in container testing
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 02-Mar-2009
+ */
+public class OSGi38TestCase extends OSGiTest
+{
+   @Test
+   public void testInstallStartX() throws Exception
+   {
+      OSGiRuntime runtime = getEmbeddedRuntime();
+      try
+      {
+         runtime.addCapability(new CompendiumCapability());
+         
+         OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
+         assertBundleState(Bundle.INSTALLED, bundleX.getState());
+
+         bundleX.start();
+         assertBundleState(Bundle.ACTIVE, bundleX.getState());
+         
+         bundleX.uninstall();
+         assertBundleState(Bundle.UNINSTALLED, bundleX.getState());
+      }
+      finally
+      {
+         runtime.shutdown();
+      }
+   }
+
+   /*
+    * Install X, B
+    */
+   @Test
+   public void testInstallXBeforeB() throws Exception
+   {
+      OSGiRuntime runtime = getEmbeddedRuntime();
+      try
+      {
+         runtime.addCapability(new CompendiumCapability());
+         
+         OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
+         assertBundleState(Bundle.INSTALLED, bundleX.getState());
+
+         OSGiBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
+         assertBundleState(Bundle.INSTALLED, bundleB.getState());
+
+         bundleB.start();
+         assertBundleState(Bundle.RESOLVED, bundleX.getState());
+         assertBundleState(Bundle.ACTIVE, bundleB.getState());
+         
+         bundleB.uninstall();
+         bundleX.uninstall();
+      }
+      finally
+      {
+         runtime.shutdown();
+      }
+   }
+
+   /*
+    * Install X, B, A
+    */
+   @Test
+   public void testInstallBBeforeA() throws Exception
+   {
+      OSGiRuntime runtime = getEmbeddedRuntime();
+      try
+      {
+         runtime.addCapability(new CompendiumCapability());
+         
+         OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
+         assertBundleState(Bundle.INSTALLED, bundleX.getState());
+
+         OSGiBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
+         assertBundleState(Bundle.INSTALLED, bundleB.getState());
+
+         OSGiBundle bundleA = runtime.installBundle("jbosgi38-bundleA.jar");
+         assertBundleState(Bundle.INSTALLED, bundleA.getState());
+
+         bundleA.start();
+         assertBundleState(Bundle.RESOLVED, bundleX.getState());
+         assertBundleState(Bundle.RESOLVED, bundleB.getState());
+         assertBundleState(Bundle.ACTIVE, bundleA.getState());
+         
+         bundleA.uninstall();
+         bundleB.uninstall();
+         bundleX.uninstall();
+      }
+      finally
+      {
+         runtime.shutdown();
+      }
+   }
+
+   /*
+    * Install B, X
+    */
+   @Test
+   public void testInstallBBeforeX() throws Exception
+   {
+      OSGiRuntime runtime = getEmbeddedRuntime();
+      try
+      {
+         runtime.addCapability(new CompendiumCapability());
+         
+         OSGiBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
+         assertBundleState(Bundle.INSTALLED, bundleB.getState());
+
+         try
+         {
+            bundleB.start();
+            fail("Unresolved constraint expected");
+         }
+         catch (BundleException ex)
+         {
+            // expected
+         }
+
+         OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
+         assertBundleState(Bundle.INSTALLED, bundleX.getState());
+
+         bundleB.start();
+         assertBundleState(Bundle.RESOLVED, bundleX.getState());
+         assertBundleState(Bundle.ACTIVE, bundleB.getState());
+
+         bundleB.uninstall();
+         bundleX.uninstall();
+      }
+      finally
+      {
+         runtime.shutdown();
+      }
+   }
+
+   /*
+    * Install A, B, X
+    */
+   @Test
+   public void testInstallABeforeB() throws Exception
+   {
+      OSGiRuntime runtime = getEmbeddedRuntime();
+      try
+      {
+         runtime.addCapability(new CompendiumCapability());
+         
+         OSGiBundle bundleA = runtime.installBundle("jbosgi38-bundleA.jar");
+         assertBundleState(Bundle.INSTALLED, bundleA.getState());
+
+         OSGiBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
+         assertBundleState(Bundle.INSTALLED, bundleB.getState());
+
+         try
+         {
+            bundleB.start();
+            fail("Unresolved constraint expected");
+         }
+         catch (BundleException ex)
+         {
+            // expected
+         }
+
+         OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
+         assertBundleState(Bundle.INSTALLED, bundleX.getState());
+
+         bundleB.start();
+         assertBundleState(Bundle.RESOLVED, bundleX.getState());
+         assertBundleState(Bundle.ACTIVE, bundleB.getState());
+         
+         bundleA.start();
+         assertBundleState(Bundle.ACTIVE, bundleA.getState());
+
+         bundleA.uninstall();
+         bundleB.uninstall();
+         bundleX.uninstall();
+      }
+      finally
+      {
+         runtime.shutdown();
+      }
+   }
+
+   /*
+    * Uninstall X, B stays active
+    */
+   @Test
+   public void testUninstallX() throws Exception
+   {
+      if ("jbossmc".equals(getFramework()))
+      {
+         System.out.println("FIXME [JBOSGI-213] Unexpected dependee state changes");
+         return;
+      }
+         
+      OSGiRuntime runtime = getEmbeddedRuntime();
+      try
+      {
+         runtime.addCapability(new CompendiumCapability());
+         
+         OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
+         assertBundleState(Bundle.INSTALLED, bundleX.getState());
+
+         OSGiBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
+         assertBundleState(Bundle.INSTALLED, bundleB.getState());
+
+         bundleB.start();
+         assertBundleState(Bundle.RESOLVED, bundleX.getState());
+         assertBundleState(Bundle.ACTIVE, bundleB.getState());
+         
+         bundleX.stop();
+         assertBundleState(Bundle.RESOLVED, bundleX.getState());
+         assertBundleState(Bundle.ACTIVE, bundleB.getState());
+         
+         bundleX.uninstall();
+         assertBundleState(Bundle.UNINSTALLED, bundleX.getState());
+         assertBundleState(Bundle.ACTIVE, bundleB.getState());
+         
+         bundleB.uninstall();
+         assertBundleState(Bundle.UNINSTALLED, bundleB.getState());
+      }
+      finally
+      {
+         runtime.shutdown();
+      }
+   }
+
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,174 +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.jbosgi39;
-
-//$Id: OSGI39TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
-
-import static org.junit.Assert.fail;
-
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiPackageAdmin;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleException;
-
-/**
- * [JBOSGI-39] Bundle gets wired to an already uninstalled bundle
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-39
- * 
- * Bundle B depends on bundle X.
- * 
- * B ---> X 
- * 
- * @author thomas.diesler at jboss.com
- * @since 04-Mar-2009
- */
-public class OSGI39TestCase extends OSGiTest
-{
-   private OSGiRuntime runtime;
-
-   @Before
-   public void setUp()
-   {
-      runtime = getDefaultRuntime();
-      
-      OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
-      packageAdmin.refreshPackages(null);
-   }
-
-   @After
-   public void tearDown()
-   {
-      runtime.shutdown();
-   }
-
-   @Test
-   public void testVerifyUnresolved() throws Exception
-   {
-      OSGiBundle bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
-      assertBundleState(Bundle.INSTALLED, bundleB.getState());
-
-      try
-      {
-         bundleB.start();
-         fail("Unresolved constraint expected");
-      }
-      catch (BundleException ex)
-      {
-         // expected
-      }
-
-      OSGiBundle bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
-
-      bundleB.start();
-
-      assertBundleState(Bundle.RESOLVED, bundleX.getState());
-      assertBundleState(Bundle.ACTIVE, bundleB.getState());
-
-      bundleB.uninstall();
-      bundleX.uninstall();
-   }
-
-   /*
-    * 4.3.11 Uninstalling Bundles
-    * 
-    * Once this method returns, the state of the OSGi Service Platform must be the same as if the bundle had never been installed, unless:
-    * 
-    * - The uninstalled bundle has exported any packages (via its Export-Package manifest header)
-    * - The uninstalled bundle was selected by the Framework as the exporter of these packages.
-    * 
-    * If none of the old exports are used, then the old exports must be removed. Otherwise, all old exports must remain available
-    * for existing bundles and future resolves until the refreshPackages method is called or the Framework is restarted.
-    */
-   @Test
-   public void testWiringToUninstalled() throws Exception
-   {
-      OSGiBundle bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
-      OSGiBundle bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
-
-      bundleB.start();
-
-      assertBundleState(Bundle.RESOLVED, bundleX.getState());
-      assertBundleState(Bundle.ACTIVE, bundleB.getState());
-
-      // Uninstall X before B
-      bundleX.uninstall();
-      bundleB.uninstall();
-
-      // Install B without X
-      bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
-
-      bundleB.start();
-
-      assertBundleState(Bundle.ACTIVE, bundleB.getState());
-
-      bundleB.uninstall();
-   }
-
-   @Test
-   public void testWiringToUninstalledPackageAdmin() throws Exception
-   {
-      OSGiBundle bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
-      OSGiBundle bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
-
-      bundleB.start();
-
-      assertBundleState(Bundle.RESOLVED, bundleX.getState());
-      assertBundleState(Bundle.ACTIVE, bundleB.getState());
-
-      // Uninstall X before B
-      bundleX.uninstall();
-      bundleB.uninstall();
-
-      // Forces the update (replacement) or removal of packages exported by the specified bundles.
-      OSGiPackageAdmin packAdmin = runtime.getPackageAdmin();
-      packAdmin.refreshPackages(null);
-
-      // Install B without X
-      bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
-
-      try
-      {
-         bundleB.start();
-         fail("Unresolved constraint expected");
-      }
-      catch (BundleException ex)
-      {
-         // expected
-      }
-
-      bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
-
-      bundleB.start();
-
-      assertBundleState(Bundle.RESOLVED, bundleX.getState());
-      assertBundleState(Bundle.ACTIVE, bundleB.getState());
-
-      bundleB.uninstall();
-      bundleX.uninstall();
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGi39TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGi39TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGi39TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,174 @@
+/*
+ * 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.jbosgi39;
+
+//$Id: OSGI39TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
+
+import static org.junit.Assert.fail;
+
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiPackageAdmin;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+
+/**
+ * [JBOSGI-39] Bundle gets wired to an already uninstalled bundle
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-39
+ * 
+ * Bundle B depends on bundle X.
+ * 
+ * B ---> X 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 04-Mar-2009
+ */
+public class OSGi39TestCase extends OSGiTest
+{
+   private OSGiRuntime runtime;
+
+   @Before
+   public void setUp()
+   {
+      runtime = getDefaultRuntime();
+      
+      OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
+      packageAdmin.refreshPackages(null);
+   }
+
+   @After
+   public void tearDown()
+   {
+      runtime.shutdown();
+   }
+
+   @Test
+   public void testVerifyUnresolved() throws Exception
+   {
+      OSGiBundle bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
+      assertBundleState(Bundle.INSTALLED, bundleB.getState());
+
+      try
+      {
+         bundleB.start();
+         fail("Unresolved constraint expected");
+      }
+      catch (BundleException ex)
+      {
+         // expected
+      }
+
+      OSGiBundle bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
+
+      bundleB.start();
+
+      assertBundleState(Bundle.RESOLVED, bundleX.getState());
+      assertBundleState(Bundle.ACTIVE, bundleB.getState());
+
+      bundleB.uninstall();
+      bundleX.uninstall();
+   }
+
+   /*
+    * 4.3.11 Uninstalling Bundles
+    * 
+    * Once this method returns, the state of the OSGi Service Platform must be the same as if the bundle had never been installed, unless:
+    * 
+    * - The uninstalled bundle has exported any packages (via its Export-Package manifest header)
+    * - The uninstalled bundle was selected by the Framework as the exporter of these packages.
+    * 
+    * If none of the old exports are used, then the old exports must be removed. Otherwise, all old exports must remain available
+    * for existing bundles and future resolves until the refreshPackages method is called or the Framework is restarted.
+    */
+   @Test
+   public void testWiringToUninstalled() throws Exception
+   {
+      OSGiBundle bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
+      OSGiBundle bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
+
+      bundleB.start();
+
+      assertBundleState(Bundle.RESOLVED, bundleX.getState());
+      assertBundleState(Bundle.ACTIVE, bundleB.getState());
+
+      // Uninstall X before B
+      bundleX.uninstall();
+      bundleB.uninstall();
+
+      // Install B without X
+      bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
+
+      bundleB.start();
+
+      assertBundleState(Bundle.ACTIVE, bundleB.getState());
+
+      bundleB.uninstall();
+   }
+
+   @Test
+   public void testWiringToUninstalledPackageAdmin() throws Exception
+   {
+      OSGiBundle bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
+      OSGiBundle bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
+
+      bundleB.start();
+
+      assertBundleState(Bundle.RESOLVED, bundleX.getState());
+      assertBundleState(Bundle.ACTIVE, bundleB.getState());
+
+      // Uninstall X before B
+      bundleX.uninstall();
+      bundleB.uninstall();
+
+      // Forces the update (replacement) or removal of packages exported by the specified bundles.
+      OSGiPackageAdmin packAdmin = runtime.getPackageAdmin();
+      packAdmin.refreshPackages(null);
+
+      // Install B without X
+      bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
+
+      try
+      {
+         bundleB.start();
+         fail("Unresolved constraint expected");
+      }
+      catch (BundleException ex)
+      {
+         // expected
+      }
+
+      bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
+
+      bundleB.start();
+
+      assertBundleState(Bundle.RESOLVED, bundleX.getState());
+      assertBundleState(Bundle.ACTIVE, bundleB.getState());
+
+      bundleB.uninstall();
+      bundleX.uninstall();
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,95 +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.jbosgi41;
-
-//$Id: OSGI41RemoteTestCase.java 87182 2009-04-13 13:47:53Z thomas.diesler at jboss.com $
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-
-import org.jboss.osgi.spi.capability.ConfigAdminCapability;
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTest;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-
-/**
- * [JBOSGI-41] Verify persistent file storage
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-41
- * 
- * @author thomas.diesler at jboss.com
- * @since 05-Mar-2009
- */
-public class OSGI41TestCase extends OSGiTest
-{
-   @Test
-   public void testFirstRun() throws Exception
-   {
-      OSGiRuntime runtime = getDefaultRuntime();
-      try
-      {
-         runtime.addCapability(new ConfigAdminCapability());
-         
-         OSGiBundle bundleA = runtime.installBundle("jbosgi41-bundleA.jar");
-         bundleA.start();
-         
-         assertBundleState(Bundle.ACTIVE, bundleA.getState());
-         
-         File dataFile = getBundleDataFile(bundleA, "config/jbosgi41.txt");
-         assertTrue("File exists: " + dataFile, dataFile.exists());
-         
-         BufferedReader br = new BufferedReader(new FileReader(dataFile));
-         assertEquals("jbosgi41-bundleA", br.readLine());
-         
-         bundleA.uninstall();
-      }
-      finally
-      {
-         runtime.shutdown();
-      }
-   }
-
-   private File getBundleDataFile(OSGiBundle bundleA, String filename)
-   {
-      OSGiBundle systemBundle = bundleA.getRuntime().getBundle(0);
-      String storageRoot = systemBundle.getProperty("org.osgi.framework.storage");
-      assertNotNull("Storage dir not null", storageRoot);
-
-      File dataFile;
-      if ("equinox".equals(getFramework()))
-      {
-         dataFile = new File(storageRoot + "/org.eclipse.osgi/bundles/" + bundleA.getBundleId() + "/data/" + filename);
-      }
-      else
-      {
-         dataFile = new File(storageRoot + "/bundle" + bundleA.getBundleId() + "/data/" + filename);
-      }
-      return dataFile;
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGi41TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGi41TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGi41TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,95 @@
+/*
+ * 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.jbosgi41;
+
+//$Id: OSGI41RemoteTestCase.java 87182 2009-04-13 13:47:53Z thomas.diesler at jboss.com $
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+
+import org.jboss.osgi.spi.capability.ConfigAdminCapability;
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTest;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+/**
+ * [JBOSGI-41] Verify persistent file storage
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-41
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 05-Mar-2009
+ */
+public class OSGi41TestCase extends OSGiTest
+{
+   @Test
+   public void testFirstRun() throws Exception
+   {
+      OSGiRuntime runtime = getDefaultRuntime();
+      try
+      {
+         runtime.addCapability(new ConfigAdminCapability());
+         
+         OSGiBundle bundleA = runtime.installBundle("jbosgi41-bundleA.jar");
+         bundleA.start();
+         
+         assertBundleState(Bundle.ACTIVE, bundleA.getState());
+         
+         File dataFile = getBundleDataFile(bundleA, "config/jbosgi41.txt");
+         assertTrue("File exists: " + dataFile, dataFile.exists());
+         
+         BufferedReader br = new BufferedReader(new FileReader(dataFile));
+         assertEquals("jbosgi41-bundleA", br.readLine());
+         
+         bundleA.uninstall();
+      }
+      finally
+      {
+         runtime.shutdown();
+      }
+   }
+
+   private File getBundleDataFile(OSGiBundle bundleA, String filename)
+   {
+      OSGiBundle systemBundle = bundleA.getRuntime().getBundle(0);
+      String storageRoot = systemBundle.getProperty("org.osgi.framework.storage");
+      assertNotNull("Storage dir not null", storageRoot);
+
+      File dataFile;
+      if ("equinox".equals(getFramework()))
+      {
+         dataFile = new File(storageRoot + "/org.eclipse.osgi/bundles/" + bundleA.getBundleId() + "/data/" + filename);
+      }
+      else
+      {
+         dataFile = new File(storageRoot + "/bundle" + bundleA.getBundleId() + "/data/" + filename);
+      }
+      return dataFile;
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGI92TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGI92TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGI92TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,87 +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.jbosgi92;
-
-//$Id$
-
-import static org.junit.Assert.assertEquals;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiServiceReference;
-import org.jboss.osgi.testing.OSGiTest;
-import org.jboss.osgi.testing.OSGiTestHelper;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleException;
-
-/**
- * [JBOSGI-92] Class.forName issue with XMLParserActivator
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-92
- * 
- * @author thomas.diesler at jboss.com
- * @since 21-Jul-2009
- */
-public class OSGI92TestCase extends OSGiTest
-{
-   private static OSGiRuntime runtime;
-
-   @BeforeClass
-   public static void beforeClass() throws BundleException
-   {
-      runtime = new OSGiTestHelper().getDefaultRuntime();
-   }
-
-   @AfterClass
-   public static void afterClass() throws BundleException
-   {
-      if (runtime != null)
-      {
-         runtime.shutdown();
-         runtime = null;
-      }
-   }
-
-   @Test
-   @Ignore("Fails with apache felix compendium-1.2.0")
-   public void testDeployParsers() throws Exception
-   {
-      OSGiBundle bundleA = runtime.installBundle("jbosgi92-bundleA.jar");
-      bundleA.start();
-
-      assertBundleState(Bundle.ACTIVE, bundleA.getState());
-      
-      String filter = "(parser.factoryname=org.jboss.test.osgi.jbosgi92.bundleA.*)";
-      OSGiServiceReference[] domRefs = runtime.getServiceReferences(DocumentBuilderFactory.class.getName(), filter);
-      assertEquals("DocumentBuilderFactory servce available", 1, domRefs.length);
-
-      OSGiServiceReference[] saxRefs = runtime.getServiceReferences(SAXParserFactory.class.getName(), filter);
-      assertEquals("SAXParserFactory servce available", 1, saxRefs.length);
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGi92TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGI92TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGi92TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGi92TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,87 @@
+/*
+ * 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.jbosgi92;
+
+//$Id$
+
+import static org.junit.Assert.assertEquals;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiServiceReference;
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.osgi.testing.OSGiTestHelper;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+
+/**
+ * [JBOSGI-92] Class.forName issue with XMLParserActivator
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-92
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 21-Jul-2009
+ */
+public class OSGi92TestCase extends OSGiTest
+{
+   private static OSGiRuntime runtime;
+
+   @BeforeClass
+   public static void beforeClass() throws BundleException
+   {
+      runtime = new OSGiTestHelper().getDefaultRuntime();
+   }
+
+   @AfterClass
+   public static void afterClass() throws BundleException
+   {
+      if (runtime != null)
+      {
+         runtime.shutdown();
+         runtime = null;
+      }
+   }
+
+   @Test
+   @Ignore("Fails with apache felix compendium-1.2.0")
+   public void testDeployParsers() throws Exception
+   {
+      OSGiBundle bundleA = runtime.installBundle("jbosgi92-bundleA.jar");
+      bundleA.start();
+
+      assertBundleState(Bundle.ACTIVE, bundleA.getState());
+      
+      String filter = "(parser.factoryname=org.jboss.test.osgi.jbosgi92.bundleA.*)";
+      OSGiServiceReference[] domRefs = runtime.getServiceReferences(DocumentBuilderFactory.class.getName(), filter);
+      assertEquals("DocumentBuilderFactory servce available", 1, domRefs.length);
+
+      OSGiServiceReference[] saxRefs = runtime.getServiceReferences(SAXParserFactory.class.getName(), filter);
+      assertEquals("SAXParserFactory servce available", 1, saxRefs.length);
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGI99TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGI99TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGI99TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,196 +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.jbosgi99;
-
-//$Id: OSGI39TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-import org.jboss.osgi.spi.util.ConstantsHelper;
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTest;
-import org.jboss.osgi.testing.OSGiTestHelper;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * [JBOSGI-99] No explicit control over bundle.start()
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-99
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2009
- */
-public class OSGI99TestCase extends OSGiTest
-{
-   // Provide logging
-   private static Logger log = LoggerFactory.getLogger(OSGI99TestCase.class);
-
-   private static OSGiRuntime runtime;
-
-   @BeforeClass
-   public static void beforeClass()
-   {
-      runtime = new OSGiTestHelper().getDefaultRuntime();
-   }
-
-   @AfterClass
-   public static void afterClass()
-   {
-      if (runtime != null)
-      {
-         runtime.shutdown();
-         runtime = null;
-      }
-   }
-
-   @Test
-   public void testAllGood() throws Exception
-   {
-      OSGiBundle bundle = runtime.installBundle("jbosgi99-allgood.jar");
-      assertBundleState(Bundle.INSTALLED, bundle.getState());
-
-      bundle.start();
-      assertBundleState(Bundle.ACTIVE, bundle.getState());
-
-      bundle.uninstall();
-
-      if (runtime.isRemoteRuntime() == false)
-         assertBundleState(Bundle.UNINSTALLED, bundle.getState());
-   }
-
-   @Test
-   public void testFailOnResolve() throws Exception
-   {
-      OSGiBundle bundle = runtime.installBundle("jbosgi99-failonresolve.jar");
-      assertBundleState(Bundle.INSTALLED, bundle.getState());
-
-      try
-      {
-         bundle.start();
-         fail("BundleException expected");
-      }
-      catch (BundleException ex)
-      {
-         log.error("State on error: " + ConstantsHelper.bundleState(bundle.getState()), ex);
-         assertBundleState(Bundle.INSTALLED, bundle.getState());
-      }
-
-      bundle.uninstall();
-
-      if (runtime.isRemoteRuntime() == false)
-         assertBundleState(Bundle.UNINSTALLED, bundle.getState());
-   }
-
-   @Test
-   public void testFailOnStart() throws Exception
-   {
-      OSGiBundle bundle = runtime.installBundle("jbosgi99-failonstart.jar");
-      assertBundleState(Bundle.INSTALLED, bundle.getState());
-
-      try
-      {
-         bundle.start();
-         fail("BundleException expected");
-      }
-      catch (BundleException ex)
-      {
-         log.error("State on error: " + ConstantsHelper.bundleState(bundle.getState()), ex);
-         assertBundleState(Bundle.RESOLVED, bundle.getState());
-      }
-
-      bundle.uninstall();
-
-      if (runtime.isRemoteRuntime() == false)
-         assertBundleState(Bundle.UNINSTALLED, bundle.getState());
-   }
-
-   @Test
-   public void testHotDeploy() throws Exception
-   {
-      if (runtime.isRemoteRuntime() == false)
-         return;
-
-      File inFile = getTestArchiveFile("jbosgi99-allgood.jar");
-
-      // Copy the bundle to the deploy directory
-      String outPath = runtime.getBundle(0).getDataFile("dummy").getAbsolutePath();
-      outPath = outPath.substring(0, outPath.indexOf("data/osgi-store"));
-      File outFile = new File(outPath + "deploy/jbosgi99-allgood.jar");
-      copyfile(inFile, outFile);
-
-      int timeout = 5000;
-      OSGiBundle bundle = null;
-      while (timeout > 0)
-      {
-         bundle = runtime.getBundle("jbosgi99-allgood", null);
-         if (bundle != null && bundle.getState() == Bundle.ACTIVE)
-            break;
-         
-         Thread.sleep(200);
-         timeout -= 200;
-      }
-      
-      assertNotNull("Bundle not null", bundle);
-      assertBundleState(Bundle.ACTIVE, bundle.getState());
-      
-      // Delete the bundle from the deploy directory
-      outFile.delete();
-
-      timeout = 5000;
-      while (timeout > 0)
-      {
-         if (bundle.getState() == Bundle.UNINSTALLED)
-            break;
-         
-         Thread.sleep(200);
-         timeout -= 200;
-      }
-      
-      assertBundleState(Bundle.UNINSTALLED, bundle.getState());
-   }
-
-   private void copyfile(File inFile, File outFile) throws IOException
-   {
-      FileInputStream in = new FileInputStream(inFile);
-      FileOutputStream out = new FileOutputStream(outFile);
-
-      int c;
-      while ((c = in.read()) != -1)
-         out.write(c);
-
-      in.close();
-      out.close();
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGi99TestCase.java (from rev 99897, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGI99TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGi99TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGi99TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,196 @@
+/*
+ * 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.jbosgi99;
+
+//$Id: OSGI39TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import org.jboss.osgi.spi.util.ConstantsHelper;
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.osgi.testing.OSGiTestHelper;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * [JBOSGI-99] No explicit control over bundle.start()
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-99
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2009
+ */
+public class OSGi99TestCase extends OSGiTest
+{
+   // Provide logging
+   private static Logger log = LoggerFactory.getLogger(OSGi99TestCase.class);
+
+   private static OSGiRuntime runtime;
+
+   @BeforeClass
+   public static void beforeClass()
+   {
+      runtime = new OSGiTestHelper().getDefaultRuntime();
+   }
+
+   @AfterClass
+   public static void afterClass()
+   {
+      if (runtime != null)
+      {
+         runtime.shutdown();
+         runtime = null;
+      }
+   }
+
+   @Test
+   public void testAllGood() throws Exception
+   {
+      OSGiBundle bundle = runtime.installBundle("jbosgi99-allgood.jar");
+      assertBundleState(Bundle.INSTALLED, bundle.getState());
+
+      bundle.start();
+      assertBundleState(Bundle.ACTIVE, bundle.getState());
+
+      bundle.uninstall();
+
+      if (runtime.isRemoteRuntime() == false)
+         assertBundleState(Bundle.UNINSTALLED, bundle.getState());
+   }
+
+   @Test
+   public void testFailOnResolve() throws Exception
+   {
+      OSGiBundle bundle = runtime.installBundle("jbosgi99-failonresolve.jar");
+      assertBundleState(Bundle.INSTALLED, bundle.getState());
+
+      try
+      {
+         bundle.start();
+         fail("BundleException expected");
+      }
+      catch (BundleException ex)
+      {
+         log.error("State on error: " + ConstantsHelper.bundleState(bundle.getState()), ex);
+         assertBundleState(Bundle.INSTALLED, bundle.getState());
+      }
+
+      bundle.uninstall();
+
+      if (runtime.isRemoteRuntime() == false)
+         assertBundleState(Bundle.UNINSTALLED, bundle.getState());
+   }
+
+   @Test
+   public void testFailOnStart() throws Exception
+   {
+      OSGiBundle bundle = runtime.installBundle("jbosgi99-failonstart.jar");
+      assertBundleState(Bundle.INSTALLED, bundle.getState());
+
+      try
+      {
+         bundle.start();
+         fail("BundleException expected");
+      }
+      catch (BundleException ex)
+      {
+         log.error("State on error: " + ConstantsHelper.bundleState(bundle.getState()), ex);
+         assertBundleState(Bundle.RESOLVED, bundle.getState());
+      }
+
+      bundle.uninstall();
+
+      if (runtime.isRemoteRuntime() == false)
+         assertBundleState(Bundle.UNINSTALLED, bundle.getState());
+   }
+
+   @Test
+   public void testHotDeploy() throws Exception
+   {
+      if (runtime.isRemoteRuntime() == false)
+         return;
+
+      File inFile = getTestArchiveFile("jbosgi99-allgood.jar");
+
+      // Copy the bundle to the deploy directory
+      String outPath = runtime.getBundle(0).getDataFile("dummy").getAbsolutePath();
+      outPath = outPath.substring(0, outPath.indexOf("data/osgi-store"));
+      File outFile = new File(outPath + "deploy/jbosgi99-allgood.jar");
+      copyfile(inFile, outFile);
+
+      int timeout = 5000;
+      OSGiBundle bundle = null;
+      while (timeout > 0)
+      {
+         bundle = runtime.getBundle("jbosgi99-allgood", null);
+         if (bundle != null && bundle.getState() == Bundle.ACTIVE)
+            break;
+         
+         Thread.sleep(200);
+         timeout -= 200;
+      }
+      
+      assertNotNull("Bundle not null", bundle);
+      assertBundleState(Bundle.ACTIVE, bundle.getState());
+      
+      // Delete the bundle from the deploy directory
+      outFile.delete();
+
+      timeout = 5000;
+      while (timeout > 0)
+      {
+         if (bundle.getState() == Bundle.UNINSTALLED)
+            break;
+         
+         Thread.sleep(200);
+         timeout -= 200;
+      }
+      
+      assertBundleState(Bundle.UNINSTALLED, bundle.getState());
+   }
+
+   private void copyfile(File inFile, File outFile) throws IOException
+   {
+      FileInputStream in = new FileInputStream(inFile);
+      FileOutputStream out = new FileOutputStream(outFile);
+
+      int c;
+      while ((c = in.read()) != -1)
+         out.write(c);
+
+      in.close();
+      out.close();
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,112 +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.jbossas.jbosgi36;
-
-//$Id: OSGI36TestCase.java 86968 2009-04-08 15:51:12Z thomas.diesler at jboss.com $
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import org.jboss.osgi.jmx.JMXCapability;
-import org.jboss.osgi.spi.management.MBeanProxy;
-import org.jboss.osgi.spi.management.MBeanProxyException;
-import org.jboss.osgi.testing.OSGiTest;
-import org.jboss.osgi.testing.OSGiTestHelper;
-import org.jboss.osgi.testing.internal.RemoteRuntime;
-import org.jboss.test.osgi.jbossas.jbosgi36.mbean.FooMBean;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * [JBOSGI-36] Bundle classes leak into system classloader
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-36
- * 
- * @author thomas.diesler at jboss.com
- * @since 25-Feb-2009
- */
-public class OSGI36TestCase extends OSGiTest
-{
-   private static RemoteRuntime runtime;
-
-   @BeforeClass
-   public static void setUpClass() throws Exception
-   {
-      runtime = (RemoteRuntime)new OSGiTestHelper().getRemoteRuntime();
-      runtime.addCapability(new JMXCapability());
-
-      runtime.installBundle("jbosgi36-bundle.jar");
-      runtime.deploy("jbosgi36-mbean.jar");
-   }
-
-   @AfterClass
-   public static void tearDownClass() throws Exception
-   {
-      if (runtime != null)
-      {
-         runtime.undeploy("jbosgi36-mbean.jar");
-         runtime.shutdown();
-         runtime = null;
-      }
-   }
-
-   @Test
-   public void testAccessMBean() throws Exception
-   {
-      assertEquals("hello", getFooMBean().echo("hello"));
-   }
-
-   @Test
-   public void testAccessSomeService() throws Exception
-   {
-      try
-      {
-         String loaderName = getFooMBean().accessSomeService();
-         fail("Unexpected classloader: " + loaderName);
-      }
-      catch (ClassNotFoundException ex)
-      {
-         // expected
-      }
-   }
-
-   @Test
-   public void testAccessSomeInternal() throws Exception
-   {
-      try
-      {
-         String loaderName = getFooMBean().accessSomeInternal();
-         fail("Unexpected classloader: " + loaderName);
-      }
-      catch (ClassNotFoundException ex)
-      {
-         // expected
-      }
-   }
-
-   private FooMBean getFooMBean() throws MBeanProxyException
-   {
-      FooMBean foo = (FooMBean)MBeanProxy.get(FooMBean.class, FooMBean.OBJECT_NAME, runtime.getMBeanServer());
-      return foo;
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGi36TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGi36TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGi36TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,112 @@
+/*
+ * 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.jbossas.jbosgi36;
+
+//$Id: OSGI36TestCase.java 86968 2009-04-08 15:51:12Z thomas.diesler at jboss.com $
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import org.jboss.osgi.jmx.JMXCapability;
+import org.jboss.osgi.spi.management.MBeanProxy;
+import org.jboss.osgi.spi.management.MBeanProxyException;
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.osgi.testing.OSGiTestHelper;
+import org.jboss.osgi.testing.internal.RemoteRuntime;
+import org.jboss.test.osgi.jbossas.jbosgi36.mbean.FooMBean;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * [JBOSGI-36] Bundle classes leak into system classloader
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-36
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 25-Feb-2009
+ */
+public class OSGi36TestCase extends OSGiTest
+{
+   private static RemoteRuntime runtime;
+
+   @BeforeClass
+   public static void setUpClass() throws Exception
+   {
+      runtime = (RemoteRuntime)new OSGiTestHelper().getRemoteRuntime();
+      runtime.addCapability(new JMXCapability());
+
+      runtime.installBundle("jbosgi36-bundle.jar");
+      runtime.deploy("jbosgi36-mbean.jar");
+   }
+
+   @AfterClass
+   public static void tearDownClass() throws Exception
+   {
+      if (runtime != null)
+      {
+         runtime.undeploy("jbosgi36-mbean.jar");
+         runtime.shutdown();
+         runtime = null;
+      }
+   }
+
+   @Test
+   public void testAccessMBean() throws Exception
+   {
+      assertEquals("hello", getFooMBean().echo("hello"));
+   }
+
+   @Test
+   public void testAccessSomeService() throws Exception
+   {
+      try
+      {
+         String loaderName = getFooMBean().accessSomeService();
+         fail("Unexpected classloader: " + loaderName);
+      }
+      catch (ClassNotFoundException ex)
+      {
+         // expected
+      }
+   }
+
+   @Test
+   public void testAccessSomeInternal() throws Exception
+   {
+      try
+      {
+         String loaderName = getFooMBean().accessSomeInternal();
+         fail("Unexpected classloader: " + loaderName);
+      }
+      catch (ClassNotFoundException ex)
+      {
+         // expected
+      }
+   }
+
+   private FooMBean getFooMBean() throws MBeanProxyException
+   {
+      FooMBean foo = (FooMBean)MBeanProxy.get(FooMBean.class, FooMBean.OBJECT_NAME, runtime.getMBeanServer());
+      return foo;
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGI58TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGI58TestCase.java	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGI58TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,75 +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.jbossas.jbosgi58;
-
-//$Id$
-
-import static org.junit.Assert.assertEquals;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jboss.osgi.testing.OSGiTest;
-import org.jboss.osgi.testing.internal.RemoteRuntime;
-import org.jboss.test.osgi.jbossas.jbosgi58.ejb.StatelessBean;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * [JBOSGI-58] Framework injection in SLSB
- * 
- * https://jira.jboss.org/jira/browse/JBOSGI-58
- * 
- * @author thomas.diesler at jboss.com
- * @since 07-Dec-2009
- */
- at Ignore
-public class OSGI58TestCase extends OSGiTest
-{
-   @Test
-   public void testEJB() throws Exception
-   {
-      RemoteRuntime runtime = (RemoteRuntime)getRemoteRuntime();
-      
-      String location = getTestArchivePath("jbosgi58-ejb.jar");
-      
-      runtime.deploy(location);
-      try
-      {
-         StatelessBean bean = getRemoteBean(StatelessBean.class);
-         String symbolicName = bean.getFraemworkSymbolicName();
-         assertEquals("foo", symbolicName);
-      }
-      finally
-      {
-         runtime.undeploy(location);
-      }
-   }
-
-   @SuppressWarnings("unchecked")
-   private <T> T getRemoteBean(Class<T> beanClass) throws NamingException
-   {
-      InitialContext initContext = getInitialContext();
-      T bean = (T)initContext.lookup(beanClass.getSimpleName() + "/remote");
-      return bean;
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGi58TestCase.java (from rev 99792, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGI58TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGi58TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi58/OSGi58TestCase.java	2010-01-25 12:16:28 UTC (rev 99901)
@@ -0,0 +1,75 @@
+/*
+ * 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.jbossas.jbosgi58;
+
+//$Id$
+
+import static org.junit.Assert.assertEquals;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.osgi.testing.internal.RemoteRuntime;
+import org.jboss.test.osgi.jbossas.jbosgi58.ejb.StatelessBean;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * [JBOSGI-58] Framework injection in SLSB
+ * 
+ * https://jira.jboss.org/jira/browse/JBOSGI-58
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 07-Dec-2009
+ */
+ at Ignore
+public class OSGi58TestCase extends OSGiTest
+{
+   @Test
+   public void testEJB() throws Exception
+   {
+      RemoteRuntime runtime = (RemoteRuntime)getRemoteRuntime();
+      
+      String location = getTestArchivePath("jbosgi58-ejb.jar");
+      
+      runtime.deploy(location);
+      try
+      {
+         StatelessBean bean = getRemoteBean(StatelessBean.class);
+         String symbolicName = bean.getFraemworkSymbolicName();
+         assertEquals("foo", symbolicName);
+      }
+      finally
+      {
+         runtime.undeploy(location);
+      }
+   }
+
+   @SuppressWarnings("unchecked")
+   private <T> T getRemoteBean(Class<T> beanClass) throws NamingException
+   {
+      InitialContext initContext = getInitialContext();
+      T bean = (T)initContext.lookup(beanClass.getSimpleName() + "/remote");
+      return bean;
+   }
+}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi161/jbosgi161-bundle.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi161/jbosgi161-bundle.bnd	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi161/jbosgi161-bundle.bnd	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,6 +1,6 @@
 # bnd build -classpath target/test-classes -output target/test-libs/jbosgi161-bundle.jar src/test/resources/jbosgi161/bundle.bnd
 
 Bundle-SymbolicName: jbosgi161-bundle
-Bundle-Activator: org.jboss.test.osgi.jbosgi161.bundle.OSGI161Activator
+Bundle-Activator: org.jboss.test.osgi.jbosgi161.bundle.Activator161
 Private-Package: org.jboss.test.osgi.jbosgi161.bundle
 Import-Package: org.apache.commons.logging, org.slf4j, org.osgi.framework

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi214/jbosgi214-bundle.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi214/jbosgi214-bundle.bnd	2010-01-25 11:49:36 UTC (rev 99900)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi214/jbosgi214-bundle.bnd	2010-01-25 12:16:28 UTC (rev 99901)
@@ -1,6 +1,6 @@
 # bnd build -classpath target/test-classes -output target/test-libs/jbosgi214-bundle.jar src/test/resources/jbosgi214/jbosgi214-bundle.bnd
 
 Bundle-SymbolicName: jbosgi214-bundle
-Bundle-Activator: org.jboss.test.osgi.jbosgi214.bundle.OSGI214Activator
+Bundle-Activator: org.jboss.test.osgi.jbosgi214.bundle.Activator214
 Export-Package: org.jboss.test.osgi.jbosgi214.bundle
 Import-Package: org.jboss.test.osgi.jbosgi214, org.osgi.framework




More information about the jboss-cvs-commits mailing list