[jboss-osgi-commits] JBoss-OSGI SVN: r97340 - in projects/jboss-osgi: projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer and 10 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Thu Dec 3 07:57:03 EST 2009
Author: thomas.diesler at jboss.com
Date: 2009-12-03 07:57:01 -0500 (Thu, 03 Dec 2009)
New Revision: 97340
Added:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/
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/
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/SomeService.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi214/
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi214/jbosgi214-bundle.bnd
Modified:
projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/EmbeddedRuntime.java
projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/AbstractMicrocontainerDeployerService.java
projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
projects/jboss-osgi/trunk/testsuite/example/pom.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-equinox.properties
projects/jboss-osgi/trunk/testsuite/functional/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
Log:
[JBOSGI-214] Cannot repeatedly register service bound to an interface from the system classpath
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/EmbeddedRuntime.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/EmbeddedRuntime.java 2009-12-03 06:46:18 UTC (rev 97339)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/EmbeddedRuntime.java 2009-12-03 12:57:01 UTC (rev 97340)
@@ -34,7 +34,6 @@
import javax.management.MBeanServerFactory;
import org.jboss.osgi.deployment.deployer.DeployerService;
-import org.jboss.osgi.deployment.deployer.Deployment;
import org.jboss.osgi.spi.capability.Capability;
import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
import org.jboss.osgi.spi.util.BundleInfo;
@@ -71,30 +70,21 @@
String symbolicName = info.getSymbolicName();
Version version = info.getVersion();
URL rootURL = info.getRootURL();
-
+
OSGiBundle bundle;
-
+
BundleContext context = getBundleContext();
ServiceReference sref = context.getServiceReference(DeployerService.class.getName());
if (sref != null)
{
- Object obj = context.getService(sref);
- if (obj instanceof DeployerService)
- {
- DeployerService service = (DeployerService)obj;
- service.deploy(rootURL);
- }
- else
- {
- DeployerServiceClient deployer = new DeployerServiceClient(this, DeployerService.MBEAN_DEPLOYER_SERVICE);
- Deployment dep = deployer.createDeployment(info);
- dep.setAutoStart(false);
- deployer.deploy(new Deployment[] { dep });
- }
+ DeployerService service = (DeployerService)context.getService(sref);
+ log.debug("Install using DeployerService: " + service.getClass().getName());
+ service.deploy(rootURL);
bundle = getBundle(symbolicName, version, true);
}
else
{
+ log.debug("Install using system context");
Bundle auxBundle = context.installBundle(rootURL.toExternalForm());
bundle = new EmbeddedBundle(this, auxBundle);
}
@@ -112,13 +102,13 @@
absBundles.toArray(bundleArr);
return bundleArr;
}
-
+
public OSGiBundle getBundle(long bundleId)
{
Bundle bundle = getBundleContext().getBundle(bundleId);
return bundle != null ? new EmbeddedBundle(this, bundle) : null;
}
-
+
public OSGiServiceReference getServiceReference(String clazz)
{
ServiceReference sref = getBundleContext().getServiceReference(clazz);
@@ -128,7 +118,7 @@
public OSGiServiceReference[] getServiceReferences(String clazz, String filter)
{
OSGiServiceReference[] retRefs = null;
-
+
ServiceReference[] srefs;
try
{
@@ -138,11 +128,11 @@
{
throw new IllegalArgumentException("Invalid filter syntax: " + filter);
}
-
+
if (srefs != null)
{
retRefs = new OSGiServiceReference[srefs.length];
- for(int i=0; i < srefs.length; i++)
+ for (int i = 0; i < srefs.length; i++)
retRefs[i] = new EmbeddedServiceReference(srefs[i]);
}
return retRefs;
@@ -159,10 +149,10 @@
if (value == null)
System.setProperty(entry.getKey(), entry.getValue());
}
-
+
super.addCapability(capability);
}
-
+
@Override
public void shutdown()
{
@@ -173,6 +163,7 @@
try
{
Framework framework = bootProvider.getFramework();
+ log.debug("Framework stop: " + framework);
framework.stop();
framework.waitForStop(5000);
}
@@ -180,10 +171,13 @@
{
log.error("Cannot stop the framework", ex);
}
- getTestHelper().ungetBootstrapProvider();
+ finally
+ {
+ getTestHelper().ungetBootstrapProvider();
+ }
}
}
-
+
public BundleContext getBundleContext()
{
OSGiBootstrapProvider bootProvider = getTestHelper().getBootstrapProvider();
@@ -192,6 +186,7 @@
{
try
{
+ log.debug("Framework start: " + framework);
framework.start();
}
catch (BundleException ex)
@@ -208,14 +203,14 @@
ArrayList<MBeanServer> serverArr = MBeanServerFactory.findMBeanServer(null);
if (serverArr.size() > 1)
throw new IllegalStateException("Multiple MBeanServer instances not supported");
-
+
MBeanServer server = null;
if (serverArr.size() == 1)
server = serverArr.get(0);
-
+
if (server == null)
server = MBeanServerFactory.createMBeanServer();
-
+
return server;
}
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/AbstractMicrocontainerDeployerService.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/AbstractMicrocontainerDeployerService.java 2009-12-03 06:46:18 UTC (rev 97339)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/AbstractMicrocontainerDeployerService.java 2009-12-03 12:57:01 UTC (rev 97340)
@@ -59,7 +59,7 @@
// Provide logging
private Logger log = LoggerFactory.getLogger(AbstractMicrocontainerDeployerService.class);
- private VFSDeploymentFactory deploymentFactory = VFSDeploymentFactory.getInstance();
+ private VFSDeploymentFactory deploymentFactory;
private ServiceTracker registryTracker;
public abstract MainDeployer getMainDeployer();
@@ -124,7 +124,7 @@
for (Deployment dep : depArr)
{
VirtualFile root = dep.getRoot();
- VFSDeployment vfsdep = deploymentFactory.createVFSDeployment(root);
+ VFSDeployment vfsdep = createVFSDeployment(root);
dep.addAttachment(VFSDeployment.class, vfsdep);
registry.registerDeployment(dep);
depList.add(vfsdep);
@@ -187,6 +187,14 @@
}
}
+ private VFSDeployment createVFSDeployment(VirtualFile root)
+ {
+ if (deploymentFactory == null)
+ deploymentFactory = VFSDeploymentFactory.getInstance();
+
+ return deploymentFactory.createVFSDeployment(root);
+ }
+
private DeploymentRegistryService getDeploymentRegistry()
{
if (registryTracker == null)
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java 2009-12-03 06:46:18 UTC (rev 97339)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java 2009-12-03 12:57:01 UTC (rev 97340)
@@ -143,7 +143,7 @@
{
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
EmbeddedKernelBootstrap bootstrap = new EmbeddedKernelBootstrap(context);
-
+
kernel = bootstrap.getKernel();
KernelController controller = kernel.getController();
BundleContext sysContext = context.getBundle(0).getBundleContext();
@@ -170,21 +170,12 @@
private void registerMicrocontainerDeployerService()
{
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
-
- Properties props = new Properties();
- props.setProperty("provider", "microcontainer");
- props.put(Constants.SERVICE_RANKING, Integer.MAX_VALUE);
- MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
- MicrocontainerDeployerServiceImpl deployerService = new MicrocontainerDeployerServiceImpl(context, mainDeployer);
- context.registerService(DeployerService.class.getName(), deployerService, props);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
+ System.out.println(DeployerService.class.getClassLoader() + " ### " + Thread.currentThread().getContextClassLoader());
+ Properties props = new Properties();
+ props.setProperty("provider", "microcontainer");
+ props.put(Constants.SERVICE_RANKING, Integer.MAX_VALUE);
+ MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
+ MicrocontainerDeployerServiceImpl deployerService = new MicrocontainerDeployerServiceImpl(context, mainDeployer);
+ context.registerService(DeployerService.class.getName(), deployerService, props);
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-12-03 06:46:18 UTC (rev 97339)
+++ projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-12-03 12:57:01 UTC (rev 97340)
@@ -186,8 +186,7 @@
<exclude>org/jboss/test/osgi/example/interceptor/**</exclude>
<exclude>org/jboss/test/osgi/example/webapp/WebAppNegativeTestCase.class</exclude>
<exclude>org/jboss/test/osgi/example/webapp/WebAppInterceptorTestCase.class</exclude>
- <!-- [JBOSGI-211] Cannot run Microcontainer, Blueprint example on Equinox -->
- <exclude>org/jboss/test/osgi/example/blueprint/**</exclude>
+ <!-- [JBOSGI-214] Cannot repeatedly register service bound to an interface from the system classpath -->
<exclude>org/jboss/test/osgi/example/microcontainer/**</exclude>
</excludes>
</configuration>
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-equinox.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-equinox.properties 2009-12-03 06:46:18 UTC (rev 97339)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-equinox.properties 2009-12-03 12:57:01 UTC (rev 97340)
@@ -11,6 +11,9 @@
org.osgi.framework.storage=${basedir}/target/osgi-store
org.osgi.framework.storage.clean=onFirstInit
+# Framework bootdelegation
+# org.osgi.framework.bootdelegation=org.jboss.osgi.deployment.*
+
# Extra System Packages
org.osgi.framework.system.packages.extra=\
org.apache.log4j;version=1.2, \
Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-12-03 06:46:18 UTC (rev 97339)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-12-03 12:57:01 UTC (rev 97340)
@@ -150,6 +150,8 @@
<exclude>org/jboss/test/osgi/jbosgi39/**</exclude>
<!-- [JBOSGI-108] Investigate statics on PackageAdmin.refresh -->
<exclude>org/jboss/test/osgi/jbosgi108/**</exclude>
+ <!-- [JBOSGI-214] Cannot repeatedly register service bound to an interface from the system classpath -->
+ <exclude>org/jboss/test/osgi/jbosgi214/**</exclude>
</excludes>
</configuration>
</plugin>
Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml 2009-12-03 06:46:18 UTC (rev 97339)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml 2009-12-03 12:57:01 UTC (rev 97340)
@@ -133,6 +133,9 @@
<!-- jbosgi212 -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi212-bundle.jar" files="${tests.resources.dir}/jbosgi212/jbosgi212-bundle.bnd" />
+ <!-- jbosgi214 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi214-bundle.jar" files="${tests.resources.dir}/jbosgi214/jbosgi214-bundle.bnd" />
+
<!-- performance -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/performance-blueprint.jar" files="${tests.resources.dir}/performance/blueprint/performance-blueprint.bnd" />
Added: 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 2009-12-03 12:57:01 UTC (rev 97340)
@@ -0,0 +1,142 @@
+/*
+ * 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.*;
+
+import java.net.URL;
+
+import org.jboss.osgi.spi.framework.OSGiBootstrap;
+import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
+import org.jboss.osgi.testing.OSGiTest;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.launch.Framework;
+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
+ {
+ // Bootstrap and start the framework
+ OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
+ Framework framework = bootProvider.getFramework();
+ framework.start();
+
+ // Start the ServiceTracker
+ BundleContext context = framework.getBundleContext();
+ new SystemServiceTracker(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(OSGiBootstrapProvider.class.getName());
+ OSGiBootstrapProvider service = (OSGiBootstrapProvider)context.getService(sref);
+ assertNotNull("Service not null", service);
+
+ // Uninstall the test bundle
+ bundle.uninstall();
+ }
+ finally
+ {
+ // Stop the framework
+ framework.stop();
+ framework.waitForStop(5000);
+ }
+ }
+
+ @Test
+ public void testSecondRun() throws Exception
+ {
+ // Bootstrap and start the framework
+ OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
+ Framework framework = bootProvider.getFramework();
+ framework.start();
+
+ // Start the ServiceTracker
+ BundleContext context = framework.getBundleContext();
+ new SystemServiceTracker(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(OSGiBootstrapProvider.class.getName());
+ OSGiBootstrapProvider service = (OSGiBootstrapProvider)context.getService(sref);
+ assertNotNull("Service not null", service);
+
+ // Uninstall the test bundle
+ bundle.uninstall();
+ }
+ finally
+ {
+ // Stop the framework
+ framework.stop();
+ framework.waitForStop(5000);
+ }
+ }
+
+ class SystemServiceTracker extends ServiceTracker
+ {
+ public SystemServiceTracker(BundleContext context)
+ {
+ super(context, OSGiBootstrapProvider.class.getName(), null);
+ }
+
+ @Override
+ public Object addingService(ServiceReference sref)
+ {
+ Object serviceObj = super.addingService(sref);
+ //System.out.println("addingService: " + serviceObj);
+ return (OSGiBootstrapProvider)serviceObj;
+ }
+
+ @Override
+ public void removedService(ServiceReference reference, Object serviceObj)
+ {
+ //System.out.println("removedService: " + serviceObj);
+ super.removedService(reference, serviceObj);
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/OSGI214TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: 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 (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/OSGI214Activator.java 2009-12-03 12:57:01 UTC (rev 97340)
@@ -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.osgi.spi.framework.OSGiBootstrapProvider;
+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(OSGiBootstrapProvider.class.getName(), new SomeService(), null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/OSGI214Activator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/SomeService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/SomeService.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/SomeService.java 2009-12-03 12:57:01 UTC (rev 97340)
@@ -0,0 +1,60 @@
+/*
+ * 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 java.io.InputStream;
+import java.net.URL;
+
+import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
+import org.osgi.framework.launch.Framework;
+
+/**
+ * A service that implements an interface from the system classpath
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 24-Apr-2009
+ */
+public class SomeService implements OSGiBootstrapProvider
+{
+ public void configure()
+ {
+ }
+
+ public void configure(URL urlConfig)
+ {
+ }
+
+ public void configure(String resourceConfig)
+ {
+ }
+
+ public void configure(InputStream streamConfig)
+ {
+ }
+
+ public Framework getFramework()
+ {
+ return null;
+ }
+}
Property changes on: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/SomeService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: 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 (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi214/jbosgi214-bundle.bnd 2009-12-03 12:57:01 UTC (rev 97340)
@@ -0,0 +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
+Export-Package: org.jboss.test.osgi.jbosgi214.bundle
+Import-Package: org.jboss.osgi.spi.framework, org.osgi.framework, org.osgi.framework.launch
More information about the jboss-osgi-commits
mailing list