[jboss-cvs] JBossAS SVN: r88356 - in projects/jboss-osgi/trunk: bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle and 12 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu May 7 09:13:26 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-05-07 09:13:26 -0400 (Thu, 07 May 2009)
New Revision: 88356

Added:
   projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/JMXTestCase.java
   projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/JMXTestService.java
   projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/JNDITestCase.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
Removed:
   projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/JMXTestCase.java
   projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/JMXTestService.java
   projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/JNDITestCase.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-bootstrap-beans.xml
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix-beans.xml
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jndi.properties
   projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jndi.properties
Modified:
   projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/ServiceActivator.java
   projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/bundle/ServiceActivator.java
   projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/MicrocontainerTestCase.java
   projects/jboss-osgi/trunk/bundle/jmx/src/main/java/org/jboss/osgi/jmx/internal/JMXConnectorService.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTestSetup.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/org.jboss.osgi.spi.framework.OSGiBootstrapProvider
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/bootstrap/BootstrapTestCase.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/resources/jboss-osgi-felix.properties
Log:
Migrate tests to use abstract OSGiRuntime - embedded ok

Deleted: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/JMXTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/JMXTestCase.java	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/JMXTestCase.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -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.blueprint.jmx;
-
-//$Id$
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-
-import junit.framework.Test;
-
-import org.jboss.osgi.spi.management.MBeanProxy;
-import org.jboss.osgi.spi.testing.AbstractBundle;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
-import org.jboss.osgi.spi.testing.JMXCapability;
-import org.jboss.osgi.spi.testing.JNDICapability;
-import org.jboss.osgi.spi.testing.OSGiTest;
-import org.jboss.osgi.spi.testing.OSGiTestSetup;
-import org.jboss.test.osgi.blueprint.jmx.bundle.FooMBean;
-
-/**
- * A test that deployes a bundle that registeres an MBean
- * 
- * @author thomas.diesler at jboss.com
- * @since 12-Feb-2009
- */
-public class JMXTestCase extends OSGiTest
-{
-   private static OSGiRuntime runtime;
-
-   public static Test suite()
-   {
-      OSGiTestSetup setup = new OSGiTestSetup(JMXTestCase.class)
-      {
-         @Override
-         protected void setUp() throws Exception
-         {
-            super.setUp();
-            runtime = getDefaultRuntime();
-            runtime.addCapability(new JNDICapability());
-            runtime.addCapability(new JMXCapability());
-
-            AbstractBundle bundle = runtime.installBundle("jmx-test.jar");
-            bundle.start();
-         }
-
-         @Override
-         protected void tearDown() throws Exception
-         {
-            runtime.shutdown();
-            super.tearDown();
-         }
-      };
-      return setup;
-   }
-
-   public void testMBeanAccess() throws Exception
-   {
-      ObjectName oname = new ObjectName("jboss.osgi:service=mbean-test-service");
-      FooMBean foo = (FooMBean)MBeanProxy.get(FooMBean.class, oname, runtime.getMBeanServer());
-      assertEquals("hello", foo.echo("hello"));
-   }
-
-   public void testRMIAdaptor() throws Exception
-   {
-      // Lookup the MBeanServerConnection
-      InitialContext iniCtx = new InitialContext();
-      MBeanServerConnection rmiAdaptor = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
-
-      // Access the MBean through the MBeanServerConnection
-      ObjectName oname = new ObjectName("jboss.osgi:service=mbean-test-service");
-      FooMBean foo = (FooMBean)MBeanProxy.get(FooMBean.class, oname, rmiAdaptor);
-      assertEquals("hello", foo.echo("hello"));
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/JMXTestCase.java (from rev 88347, projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/JMXTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/JMXTestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/JMXTestCase.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.blueprint.jmx;
+
+//$Id$
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+
+import junit.framework.Test;
+
+import org.jboss.osgi.spi.management.MBeanProxy;
+import org.jboss.osgi.spi.testing.AbstractBundle;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
+import org.jboss.osgi.spi.testing.JMXCapability;
+import org.jboss.osgi.spi.testing.JNDICapability;
+import org.jboss.osgi.spi.testing.OSGiTest;
+import org.jboss.osgi.spi.testing.OSGiTestSetup;
+import org.jboss.test.osgi.blueprint.jmx.bundle.FooMBean;
+
+/**
+ * A test that deployes a bundle that registeres an MBean
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 12-Feb-2009
+ */
+public class JMXTestCase extends OSGiTest
+{
+   private static OSGiRuntime runtime;
+   private static AbstractBundle bundle;
+
+   public static Test suite()
+   {
+      OSGiTestSetup setup = new OSGiTestSetup(JMXTestCase.class)
+      {
+         @Override
+         protected void setUp() throws Exception
+         {
+            super.setUp();
+            runtime = getDefaultRuntime();
+            runtime.addCapability(new JNDICapability());
+            runtime.addCapability(new JMXCapability());
+
+            bundle = runtime.installBundle("jmx-test.jar");
+            bundle.start();
+         }
+
+         @Override
+         protected void tearDown() throws Exception
+         {
+            bundle.uninstall();
+            runtime.shutdown();
+            super.tearDown();
+         }
+      };
+      return setup;
+   }
+
+   public void testMBeanAccess() throws Exception
+   {
+      ObjectName oname = new ObjectName("jboss.osgi:service=mbean-test-service");
+      FooMBean foo = (FooMBean)MBeanProxy.get(FooMBean.class, oname, runtime.getMBeanServer());
+      assertEquals("hello", foo.echo("hello"));
+   }
+
+   public void testRMIAdaptor() throws Exception
+   {
+      // Lookup the MBeanServerConnection
+      InitialContext iniCtx = runtime.getInitialContext();
+      MBeanServerConnection rmiAdaptor = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+
+      // Access the MBean through the MBeanServerConnection
+      ObjectName oname = new ObjectName("jboss.osgi:service=mbean-test-service");
+      FooMBean foo = (FooMBean)MBeanProxy.get(FooMBean.class, oname, rmiAdaptor);
+      assertEquals("hello", foo.echo("hello"));
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/JMXTestService.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/JMXTestService.java	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/JMXTestService.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.blueprint.jmx.bundle;
-
-//$Id$
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * A service that registers an MBean
- * 
- * @author thomas.diesler at jboss.com
- * @since 24-Apr-2009
- */
-public class JMXTestService
-{
-   public JMXTestService(BundleContext context)
-   {
-      ServiceTracker tracker = new ServiceTracker(context, MBeanServer.class.getName(), null);
-      tracker.open();
-      
-      MBeanServer mbeanServer = (MBeanServer)tracker.getService();
-      if (mbeanServer == null)
-         throw new IllegalStateException("No MBeanServer");
-
-      try
-      {
-         ObjectName oname = new ObjectName("jboss.osgi:service=mbean-test-service");
-         mbeanServer.registerMBean(new Foo(), oname);
-      }
-      catch (Exception ex)
-      {
-         throw new IllegalStateException(ex);
-      }
-   }
-}

Copied: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/JMXTestService.java (from rev 88323, projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/JMXTestService.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/JMXTestService.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/JMXTestService.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -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.blueprint.jmx.bundle;
+
+//$Id$
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.osgi.jmx.ObjectNameFactory;
+import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * A service that registers an MBean
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 24-Apr-2009
+ */
+public class JMXTestService
+{
+   private ServiceTracker tracker;
+   private ObjectName objectName = ObjectNameFactory.create("jboss.osgi:service=mbean-test-service");
+   
+   public JMXTestService(BundleContext context)
+   {
+      tracker = new ServiceTracker(context, MBeanServer.class.getName(), null);
+      tracker.open();
+      
+      MBeanServer mbeanServer = getMBeanServer();
+      if (mbeanServer == null)
+         throw new IllegalStateException("No MBeanServer");
+   }
+
+   public void start()
+   {
+      try
+      {
+         MBeanServer mbeanServer = getMBeanServer();
+         mbeanServer.registerMBean(new Foo(), objectName);
+      }
+      catch (Exception ex)
+      {
+         throw new IllegalStateException(ex);
+      }
+   }
+
+   public void stop()
+   {
+      try
+      {
+         MBeanServer mbeanServer = getMBeanServer();
+         mbeanServer.isRegistered(objectName);
+         mbeanServer.unregisterMBean(objectName);
+      }
+      catch (Exception ex)
+      {
+         throw new IllegalStateException(ex);
+      }
+   }
+
+   private MBeanServer getMBeanServer()
+   {
+      return (MBeanServer)tracker.getService();
+   }
+}

Modified: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/ServiceActivator.java	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jmx/bundle/ServiceActivator.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -34,13 +34,22 @@
  */
 public class ServiceActivator implements BundleActivator
 {
+   private JMXTestService service;
+   
    public void start(BundleContext context)
    {
-      JMXTestService service = new JMXTestService(context);
+      service = new JMXTestService(context);
+      service.start();
+      
       context.registerService(JMXTestService.class.getName(), service, null);
    }
 
    public void stop(BundleContext context)
    {
+      if (service != null)
+      {
+         service.stop();
+         service = null;
+      }
    }
 }
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/JNDITestCase.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/JNDITestCase.java	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/JNDITestCase.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -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.blueprint.jndi;
-
-//$Id$
-
-import javax.naming.InitialContext;
-import javax.naming.NameNotFoundException;
-
-import junit.framework.Test;
-
-import org.jboss.osgi.spi.testing.AbstractBundle;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
-import org.jboss.osgi.spi.testing.JNDICapability;
-import org.jboss.osgi.spi.testing.OSGiTest;
-import org.jboss.osgi.spi.testing.OSGiTestSetup;
-import org.osgi.framework.Bundle;
-
-/**
- * A test that deployes a bundle that binds a String to JNDI
- * 
- * @author thomas.diesler at jboss.com
- * @since 05-May-2009
- */
-public class JNDITestCase extends OSGiTest
-{
-   private static OSGiRuntime runtime;
-
-   public static Test suite()
-   {
-      OSGiTestSetup setup = new OSGiTestSetup(JNDITestCase.class)
-      {
-         @Override
-         protected void setUp() throws Exception
-         {
-            super.setUp();
-            runtime = getDefaultRuntime();
-            runtime.addCapability(new JNDICapability());
-         }
-
-         @Override
-         protected void tearDown() throws Exception
-         {
-            runtime.shutdown();
-            super.tearDown();
-         }
-      };
-      return setup;
-   }
-
-   public void testJNDIAccess() throws Exception
-   {
-      AbstractBundle bundle = runtime.installBundle("jndi-test.jar");
-      bundle.start();
-      
-      assertEquals("Test bundle ACTIVE", Bundle.ACTIVE, bundle.getState());
-
-      InitialContext iniCtx = runtime.getInitialContext();
-      String lookup = (String)iniCtx.lookup("test/Foo");
-      assertEquals("JNDI bound String expected", "Bar", lookup);
-
-      // Uninstall should unbind the object
-      bundle.uninstall();
-
-      try
-      {
-         iniCtx.lookup("test/Foo");
-         fail("NameNotFoundException expected");
-      }
-      catch (NameNotFoundException ex)
-      {
-         // expected
-      }
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/JNDITestCase.java (from rev 88347, projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/JNDITestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/JNDITestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/JNDITestCase.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -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.blueprint.jndi;
+
+//$Id$
+
+import javax.naming.InitialContext;
+import javax.naming.NameNotFoundException;
+
+import junit.framework.Test;
+
+import org.jboss.osgi.spi.testing.AbstractBundle;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
+import org.jboss.osgi.spi.testing.JNDICapability;
+import org.jboss.osgi.spi.testing.OSGiTest;
+import org.jboss.osgi.spi.testing.OSGiTestSetup;
+import org.osgi.framework.Bundle;
+
+/**
+ * A test that deployes a bundle that binds a String to JNDI
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 05-May-2009
+ */
+public class JNDITestCase extends OSGiTest
+{
+   private static OSGiRuntime runtime;
+
+   public static Test suite()
+   {
+      OSGiTestSetup setup = new OSGiTestSetup(JNDITestCase.class)
+      {
+         @Override
+         protected void setUp() throws Exception
+         {
+            super.setUp();
+            runtime = getDefaultRuntime();
+            runtime.addCapability(new JNDICapability());
+         }
+
+         @Override
+         protected void tearDown() throws Exception
+         {
+            runtime.shutdown();
+            super.tearDown();
+         }
+      };
+      return setup;
+   }
+
+   public void testJNDIAccess() throws Exception
+   {
+      AbstractBundle bundle = runtime.installBundle("jndi-test.jar");
+      bundle.start();
+      
+      assertEquals("Test bundle ACTIVE", Bundle.ACTIVE, bundle.getState());
+
+      InitialContext iniCtx = runtime.getInitialContext();
+      String lookup = (String)iniCtx.lookup("test/Foo");
+      assertEquals("JNDI bound String expected", "Bar", lookup);
+
+      // Uninstall should unbind the object
+      bundle.uninstall();
+
+      try
+      {
+         iniCtx.lookup("test/Foo");
+         fail("NameNotFoundException expected");
+      }
+      catch (NameNotFoundException ex)
+      {
+         // expected
+      }
+   }
+}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/bundle/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/bundle/ServiceActivator.java	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/jndi/bundle/ServiceActivator.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -59,7 +59,7 @@
       try
       {
          InitialContext iniCtx = service.getInitialContext();
-         iniCtx.unbind("test/Foo");
+         iniCtx.unbind("test");
       }
       catch (NamingException ex)
       {

Modified: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/MicrocontainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/MicrocontainerTestCase.java	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/MicrocontainerTestCase.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -40,10 +40,10 @@
 import org.jboss.osgi.spi.management.MBeanProxy;
 import org.jboss.osgi.spi.management.ManagedFrameworkMBean;
 import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.JMXCapability;
 import org.jboss.osgi.spi.testing.JNDICapability;
 import org.jboss.osgi.spi.testing.MicrocontainerCapability;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.OSGiTest;
 import org.jboss.osgi.spi.testing.OSGiTestSetup;
 
@@ -67,8 +67,8 @@
             super.setUp();
             runtime = getDefaultRuntime();
             runtime.addCapability(new JNDICapability());
-            //runtime.addCapability(new JMXCapability());
-            //runtime.addCapability(new MicrocontainerCapability());
+            runtime.addCapability(new JMXCapability());
+            runtime.addCapability(new MicrocontainerCapability());
          }
 
          @Override
@@ -81,10 +81,7 @@
       return setup;
    }
    
-   public void testFoo() throws Exception
-   {}
-
-   public void _testServiceAccess() throws Exception
+   public void testServiceAccess() throws Exception
    {
       MicrocontainerServiceMBean mcService = MBeanProxy.get(MicrocontainerServiceMBean.class, MBEAN_MICROCONTAINER_SERVICE, runtime.getMBeanServer());
       List<String> registeredBeans = mcService.getRegisteredBeans();
@@ -97,7 +94,7 @@
    /**
     * Test whether the bundle can be deployed through the MicrocontainerServiceMBean 
     */
-   public void _testBundleDeployment() throws Exception
+   public void testBundleDeployment() throws Exception
    {
       MicrocontainerServiceMBean mcService = MBeanProxy.get(MicrocontainerServiceMBean.class, MBEAN_MICROCONTAINER_SERVICE, runtime.getMBeanServer());
       mcService.deploy(getTestArchiveURL("mcservice-bundleA.jar"));
@@ -109,7 +106,7 @@
       mcService.undeploy(getTestArchiveURL("mcservice-bundleA.jar"));
 }
 
-   public void _testBeansDeployment() throws Exception
+   public void testBeansDeployment() throws Exception
    {
       MicrocontainerServiceMBean mcService = MBeanProxy.get(MicrocontainerServiceMBean.class, MBEAN_MICROCONTAINER_SERVICE, runtime.getMBeanServer());
       mcService.deploy(getTestArchiveURL("mcservice-bundleB.jar"));

Modified: projects/jboss-osgi/trunk/bundle/jmx/src/main/java/org/jboss/osgi/jmx/internal/JMXConnectorService.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/jmx/src/main/java/org/jboss/osgi/jmx/internal/JMXConnectorService.java	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/bundle/jmx/src/main/java/org/jboss/osgi/jmx/internal/JMXConnectorService.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -28,6 +28,7 @@
 import java.rmi.RemoteException;
 import java.rmi.registry.LocateRegistry;
 import java.rmi.registry.Registry;
+import java.rmi.server.UnicastRemoteObject;
 
 import javax.management.MBeanServer;
 import javax.management.remote.JMXConnectorServer;
@@ -50,36 +51,33 @@
    private LogService log;
    private JMXServiceURL serviceURL;
    private JMXConnectorServer jmxConnectorServer;
+   private boolean shutdownRegistry;
+   private Registry rmiRegistry;
 
    public JMXConnectorService(BundleContext context, MBeanServer mbeanServer, String host, int rmiPort)
    {
       log = new LogServiceTracker(context);
 
       String jmxConnectorServerPath = "/jmxconnector";
-      
+
       try
       {
          InetAddress bindAddress = InetAddress.getByName(host);
-         
+
          // check to see if registry already created
-         Registry rmiRegistry = LocateRegistry.getRegistry(host, rmiPort);
-         if (rmiRegistry != null)
+         rmiRegistry = LocateRegistry.getRegistry(host, rmiPort);
+         try
          {
-            try
-            {
-               rmiRegistry.list();
-            }
-            catch (RemoteException e)
-            {
-               log.log(LogService.LOG_DEBUG, "No registry running at host '" + host + "', port '" + rmiPort + "'.  Will create one.");
-               rmiRegistry = LocateRegistry.createRegistry(rmiPort, null, new DefaultSocketFactory(bindAddress));
-            }
+            rmiRegistry.list();
+            log.log(LogService.LOG_DEBUG, "Registry running at host=" + host + ",port=" + rmiPort);
          }
-         else
+         catch (RemoteException e)
          {
+            log.log(LogService.LOG_DEBUG, "No registry running at host=" + host + ",port=" + rmiPort + ".  Will create one.");
             rmiRegistry = LocateRegistry.createRegistry(rmiPort, null, new DefaultSocketFactory(bindAddress));
+            shutdownRegistry = true;
          }
-         
+
          // create new connector server and start it
          serviceURL = new JMXServiceURL("service:jmx:rmi://" + host + "/jndi/rmi://" + host + ":" + rmiPort + jmxConnectorServerPath);
          jmxConnectorServer = JMXConnectorServerFactory.newJMXConnectorServer(serviceURL, null, mbeanServer);
@@ -105,12 +103,14 @@
    {
       if (jmxConnectorServer == null)
          throw new IllegalStateException("JMXConnectorServer not available");
-      
+
       ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
       try
       {
          Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+         
          jmxConnectorServer.start();
+         
          log.log(LogService.LOG_INFO, "JMXConnectorServer started: " + serviceURL);
       }
       catch (IOException ex)
@@ -129,7 +129,13 @@
       try
       {
          Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+         
          jmxConnectorServer.stop();
+         
+         // Shutdown the registry if this service created it
+         if (shutdownRegistry == true)
+            UnicastRemoteObject.unexportObject(rmiRegistry, true);
+
          log.log(LogService.LOG_DEBUG, "JMXConnectorServer stopped");
       }
       catch (IOException ex)

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -75,7 +75,7 @@
       return getClass().getName() + "." + getName();
    }
 
-   protected OSGiRuntime getRuntime()
+   protected OSGiRuntime getDefaultRuntime()
    {
       return helper.getDefaultRuntime();
    }
@@ -85,6 +85,11 @@
       return helper.getEmbeddedRuntime();
    }
 
+   public RemoteRuntime getRemoteRuntime()
+   {
+      return helper.getRemoteRuntime();
+   }
+
    protected URL getResourceURL(String resource)
    {
       return helper.getResourceURL(resource);

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTestSetup.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTestSetup.java	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTestSetup.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -69,6 +69,16 @@
       return helper.getDefaultRuntime();
    }
 
+   protected EmbeddedRuntime getEmbeddedRuntime()
+   {
+      return helper.getEmbeddedRuntime();
+   }
+
+   public RemoteRuntime getRemoteRuntime()
+   {
+      return helper.getRemoteRuntime();
+   }
+
    public URL getResourceURL(String resource)
    {
       return helper.getResourceURL(resource);

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -50,7 +50,7 @@
    {
       super.setUp();
 
-      runtime = getRuntime();
+      runtime = getDefaultRuntime();
       logEntryCache = new LogEntryCache(new LogEntryFilter("example-log(.*)", LogService.LOG_INFO, "\\[ServiceA\\](.*)"));
       runtime.startLogEntryTracking(logEntryCache);
    }

Deleted: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-bootstrap-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-bootstrap-beans.xml	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-bootstrap-beans.xml	2009-05-07 13:13:26 UTC (rev 88356)
@@ -1,111 +0,0 @@
-<!--
-   The bootstrap of the server. This should only have the minimum
-   needed to bootstrap the mc kernel and profile service.
-   
-   $Id: jboss-osgi-bootstrap-beans.xml 86378 2009-03-26 12:02:32Z thomas.diesler at jboss.com $ 
--->
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <!-- The MainDeployer -->
-   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
-      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
-      <property name="deployers"><inject bean="Deployers"/></property>
-      <property name="mgtDeploymentCreator"><inject bean="ManagedDeploymentCreator"/></property>
-   </bean>
-
-   <!-- The ManagedDeploymentCreator implementation -->
-   <bean name="ManagedDeploymentCreator" class="org.jboss.deployers.plugins.managed.DefaultManagedDeploymentCreator" />
-
-   <!-- ModificationType structure processor -->
-   <bean name="ModificationTypeStructureProcessor" class="org.jboss.deployers.vfs.plugins.structure.modify.ModificationTypeStructureProcessor">
-     <incallback method="addMatcher"/>
-     <uncallback method="removeMatcher"/>
-   </bean>
-
-   <!-- The holder for deployers that determine structure -->
-   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
-      <property name="structureBuilder">
-         <!-- The consolidator of the structure information -->
-         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder">
-           <property name="structureProcessor"><inject bean="ModificationTypeStructureProcessor"/></property>
-         </bean>
-      </property>
-      <!-- Accept any implementor of structure deployer -->
-      <incallback method="addDeployer"/>
-      <uncallback method="removeDeployer"/>
-   </bean>
-
-   <!-- The holder for deployers that do real deployment -->
-   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
-      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
-      <!-- Accept any implementor of deployer -->
-      <incallback method="addDeployer"/>
-      <uncallback method="removeDeployer"/>
-   </bean>
-
-   <!-- A declared structure descriptor deployer -->
-   <bean name="DeclaredStructure" class="org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure"/>
-
-    <!-- JAR Structure -->
-    <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
-       <property name="candidateStructureVisitorFactory">
-          <!-- Any file that is not an ordinary directory is a candidate -->
-          <bean name="JARStructureCandidates" class="org.jboss.deployers.vfs.spi.structure.helpers.DefaultCandidateStructureVisitorFactory">
-             <!-- A filter to exclude some obvious non-subdeployments -->
-             <property name="filter">
-                <bean name="JARFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter">
-                   <constructor><parameter>
-                      <list elementClass="java.lang.String">
-                         <!-- Exclude class files as subdeployments -->
-                         <value>.class</value>
-                      </list>
-                   </parameter></constructor>
-                </bean>
-             </property>
-          </bean>
-       </property>
-    </bean>
-
-    <!-- File Structure -->
-    <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure">
-       <!-- Unless specified the default list of suffixes is -service.xml, -beans.xml, -ds.xml, -aop.xml -->
-       <constructor>
-          <parameter>
-             <set elementClass="java.lang.String">
-                <value>-service.xml</value>
-                <value>-beans.xml</value>
-             </set>
-          </parameter>
-       </constructor>
-    </bean>
-
-   <!-- POJO Deployment -->
-   <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer"/>
-   <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer"/>
-   <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
-      <constructor><parameter class="org.jboss.kernel.Kernel"><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
-   </bean>
-
-   <!-- VFS ClassLoader -->
-   <bean name="ClassLoaderSystem" class="org.jboss.classloader.spi.ClassLoaderSystem">
-      <constructor factoryClass="org.jboss.classloader.spi.ClassLoaderSystem" factoryMethod="getInstance"/>
-   </bean>
-   <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
-      <incallback method="addModule" state="Configured"/>
-      <uncallback method="removeModule" state="Configured"/>
-   </bean>
-   <bean name="ClassLoadingDefaultDeployer" class="org.jboss.deployers.plugins.classloading.ClassLoadingDefaultDeployer">
-      <property name="defaultMetaData">
-         <classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY" import-all="true"/>
-      </property>
-   </bean>
-   <bean name="ClassLoaderClassPathDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer"/>
-   <bean name="ClassLoaderDescribeDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer">
-      <property name="classLoading"><inject bean="ClassLoading"/></property>
-   </bean>
-   <bean name="ClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
-      <property name="classLoading"><inject bean="ClassLoading"/></property>
-      <property name="system"><inject bean="ClassLoaderSystem"/></property>
-   </bean>
-
-</deployment>

Deleted: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix-beans.xml	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix-beans.xml	2009-05-07 13:13:26 UTC (rev 88356)
@@ -1,49 +0,0 @@
-<!--
-  $Id$ 
--->
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
-
- <!-- The OSGiFramework -->
- <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.felix.framework.FelixIntegration">
-  <property name="properties">
-   <map keyClass="java.lang.String" valueClass="java.lang.String">
-    <entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
-    <entry>
-      <key>org.osgi.framework.system.packages</key>
-      <value>
-        org.jboss.osgi.spi.logging,
-        org.osgi.framework; version=1.4,
-        org.osgi.service.log; version=1.3,
-        org.osgi.util.tracker; version=1.3,
-                
-        <!-- needed by jboss-remoting -->
-        javax.management,
-        javax.naming,
-        javax.net,
-        javax.net.ssl,
-        org.apache.log4j, 
-        org.jboss.logging,
-        org.jboss.util, 
-        org.jboss.util.id, 
-        org.jboss.util.threadpool, 
-        org.jboss.util.propertyeditor, 
-      </value>
-    </entry>
-    <!--
-      Setup remote logging  
-    -->
-    <entry><key>org.jboss.osgi.service.remote.log.reader</key><value>true</value></entry>
-    <entry><key>org.jboss.osgi.service.remote.log.host</key><value>localhost</value></entry>
-    <entry><key>org.jboss.osgi.service.remote.log.port</key><value>5400</value></entry>
-   </map>
-  </property>
-  <property name="autoStart">
-   <list elementClass="java.net.URL">
-    <value>file://${test.archive.directory}/bundles/org.apache.felix.log.jar</value>
-    <value>file://${test.archive.directory}/bundles/jboss-osgi-common.jar</value>
-    <value>file://${test.archive.directory}/bundles/jboss-osgi-logging.jar</value>
-   </list>
-  </property>
- </bean>
-
-</deployment>

Added: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties	2009-05-07 13:13:26 UTC (rev 88356)
@@ -0,0 +1,31 @@
+#
+# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
+# 
+# $Id$
+#
+
+# The OSGiFramework implementation 
+org.jboss.osgi.spi.framework.impl=org.jboss.osgi.felix.framework.FelixIntegration
+
+# Properties to configure the Framework
+org.osgi.framework.storage.clean=onFirstInit
+org.osgi.framework.bootdelegation=org.osgi.service.log
+org.osgi.framework.system.packages.extra=\
+	org.jboss.logging, \
+  	org.jboss.net.protocol, \
+  	org.jboss.osgi.spi, \
+  	org.jboss.osgi.spi.management, \
+  	org.jboss.virtual, \
+  	org.jboss.virtual.plugins.registry, \
+  	org.jboss.virtual.plugins.context.jar, \
+  	org.jboss.virtual.plugins.vfs.helpers, \
+  	org.jboss.virtual.protocol
+
+# Bundles that need to be installed with the Framework automatically 
+# org.jboss.osgi.spi.framework.autoInstall=
+
+# Bundles that need to be started automatically 
+org.jboss.osgi.spi.framework.autoStart=\
+	file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
+	file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
+	file://${test.archive.directory}/bundles/jboss-osgi-logging.jar
\ No newline at end of file


Property changes on: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jndi.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jndi.properties	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jndi.properties	2009-05-07 13:13:26 UTC (rev 88356)
@@ -1,3 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
-java.naming.provider.url=jnp://@jboss.bind.address@:1099

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/org.jboss.osgi.spi.framework.OSGiBootstrapProvider
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/org.jboss.osgi.spi.framework.OSGiBootstrapProvider	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/org.jboss.osgi.spi.framework.OSGiBootstrapProvider	2009-05-07 13:13:26 UTC (rev 88356)
@@ -1 +1 @@
-org.jboss.osgi.spi.internal.MicrocontainerBootstrapProvider
\ No newline at end of file
+org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/bootstrap/BootstrapTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/bootstrap/BootstrapTestCase.java	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/bootstrap/BootstrapTestCase.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -23,7 +23,6 @@
 
 //$Id: BootstrapTestCase.java 86588 2009-04-01 13:39:25Z thomas.diesler at jboss.com $
 
-import org.jboss.deployers.client.spi.main.MainDeployer;
 import org.jboss.osgi.spi.framework.OSGiBootstrap;
 import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
 import org.jboss.osgi.spi.framework.OSGiFramework;
@@ -48,9 +47,6 @@
 
       assertEquals("BundleId == 0", 0, bundle.getBundleId());
       assertNotNull("SymbolicName not null", bundle.getSymbolicName());
-
-      MainDeployer mainDeployer = bootProvider.getInstance("MainDeployer", MainDeployer.class);
-      assertNotNull("MainDeployer not null", mainDeployer);
    }
 
    public void testGetBootstrapProvider() throws Exception
@@ -59,34 +55,4 @@
       OSGiBootstrapProvider bp2 = OSGiBootstrap.getBootstrapProvider();
       assertNotSame("Multiple provider instances", bp1, bp2);
    }
-
-   public void testConfigureFromResource() throws Exception
-   {
-      OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
-      bootProvider.configure("bootstrap/mock-bootstrap-beans.xml");
-
-      SomeBean bean = bootProvider.getInstance("SomeBean", SomeBean.class);
-      assertNotNull("Bean not null", bean);
-
-      OSGiFramework framework = bootProvider.getFramework();
-      assertNull("Framework null", framework);
-
-      bootProvider.configure("bootstrap/mock-osgi-beans.xml");
-      assertNotNull("Framework not null", bootProvider.getFramework());
-   }
-
-   public void testConfigureFromURL() throws Exception
-   {
-      OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
-      bootProvider.configure(getResourceURL("bootstrap/mock-bootstrap-beans.xml"));
-
-      SomeBean bean = bootProvider.getInstance("SomeBean", SomeBean.class);
-      assertNotNull("Bean not null", bean);
-
-      OSGiFramework framework = bootProvider.getFramework();
-      assertNull("Framework null", framework);
-
-      bootProvider.configure(getResourceURL("bootstrap/mock-osgi-beans.xml"));
-      assertNotNull("Framework not null", bootProvider.getFramework());
-   }
 }
\ No newline at end of file

Modified: 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	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -43,7 +43,7 @@
 {
    public void testNestedBundle() throws Exception
    {
-      OSGiRuntime runtime = getRuntime();
+      OSGiRuntime runtime = getDefaultRuntime();
       try
       {
          AbstractBundle bundleA = runtime.installBundle("jbosgi37-bundleA.jar");

Modified: 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	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -49,7 +49,7 @@
     */
    public void testInstallStartX() throws Exception
    {
-      OSGiRuntime runtime = getRuntime();
+      OSGiRuntime runtime = getDefaultRuntime();
       try
       {
          AbstractBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
@@ -69,7 +69,7 @@
     */
    public void testInstallXBeforeB() throws Exception
    {
-      OSGiRuntime runtime = getRuntime();
+      OSGiRuntime runtime = getDefaultRuntime();
       try
       {
          AbstractBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
@@ -92,7 +92,7 @@
     */
    public void testInstallBBeforeA() throws Exception
    {
-      OSGiRuntime runtime = getRuntime();
+      OSGiRuntime runtime = getDefaultRuntime();
       try
       {
          AbstractBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
@@ -118,7 +118,7 @@
     */
    public void testInstallBBeforeX() throws Exception
    {
-      OSGiRuntime runtime = getRuntime();
+      OSGiRuntime runtime = getDefaultRuntime();
       try
       {
          AbstractBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
@@ -151,7 +151,7 @@
     */
    public void testInstallABeforeB() throws Exception
    {
-      OSGiRuntime runtime = getRuntime();
+      OSGiRuntime runtime = getDefaultRuntime();
       try
       {
          AbstractBundle bundleA = runtime.installBundle("jbosgi38-bundleA.jar");

Modified: 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	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java	2009-05-07 13:13:26 UTC (rev 88356)
@@ -46,7 +46,7 @@
 {
    public void testVerifyUnresolved() throws Exception
    {
-      OSGiRuntime runtime = getRuntime();
+      OSGiRuntime runtime = getDefaultRuntime();
       try
       {
          AbstractBundle bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
@@ -88,7 +88,7 @@
     */
    public void testWiringToUninstalled() throws Exception
    {
-      OSGiRuntime runtime = getRuntime();
+      OSGiRuntime runtime = getDefaultRuntime();
       try
       {
          AbstractBundle bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
@@ -120,7 +120,7 @@
 
    public void testWiringToUninstalledPackageAdmin() throws Exception
    {
-      OSGiRuntime runtime = getRuntime();
+      OSGiRuntime runtime = getDefaultRuntime();
       try
       {
          AbstractBundle bundleX = runtime.installBundle("jbosgi39-bundleX.jar");

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties	2009-05-07 13:13:26 UTC (rev 88356)
@@ -9,6 +9,7 @@
 
 # Properties to configure the Framework
 org.osgi.framework.storage.clean=onFirstInit
+org.osgi.framework.bootdelegation=org.osgi.service.log
 org.osgi.framework.system.packages.extra=\
 	org.jboss.logging, \
   	org.jboss.osgi.spi, \
@@ -21,8 +22,7 @@
   	org.jboss.virtual.protocol
 
 # Bundles that need to be installed with the Framework automatically 
-org.jboss.osgi.spi.framework.autoInstall=\
-	file://${test.archive.directory}/bundles/org.osgi.compendium.jar
+# org.jboss.osgi.spi.framework.autoInstall=
 
 # Bundles that need to be started automatically 
 org.jboss.osgi.spi.framework.autoStart=\

Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jndi.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jndi.properties	2009-05-07 12:50:07 UTC (rev 88355)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jndi.properties	2009-05-07 13:13:26 UTC (rev 88356)
@@ -1,3 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
-java.naming.provider.url=jnp://@jboss.bind.address@:1199




More information about the jboss-cvs-commits mailing list