Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2013-11-11 01:47:49 -0500
committerJan Bartel2013-11-11 01:47:49 -0500
commit278e5cb91ab93102a6e06da5880d3d0352ca0771 (patch)
tree43d979a93f6be681b88c0adb3884187fe11a74c8 /jetty-osgi/jetty-osgi-boot/src
parent50086f65128465204b90710b808712c1934e2922 (diff)
parent8d2d598a72b621920802549d31d15e51997ad947 (diff)
downloadorg.eclipse.jetty.project-278e5cb91ab93102a6e06da5880d3d0352ca0771.tar.gz
org.eclipse.jetty.project-278e5cb91ab93102a6e06da5880d3d0352ca0771.tar.xz
org.eclipse.jetty.project-278e5cb91ab93102a6e06da5880d3d0352ca0771.zip
Merge remote-tracking branch 'origin/master' into jetty-9.1
Diffstat (limited to 'jetty-osgi/jetty-osgi-boot/src')
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceContextProvider.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceContextProvider.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceContextProvider.java
index a228a6288d..a6633f9a42 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceContextProvider.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceContextProvider.java
@@ -31,6 +31,7 @@ import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.osgi.framework.Bundle;
+import org.osgi.framework.Constants;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
@@ -120,7 +121,7 @@ public class ServiceContextProvider extends AbstractContextProvider implements S
properties.put(key, serviceRef.getProperty(key));
}
Bundle bundle = serviceRef.getBundle();
- String originId = bundle.getSymbolicName() + "-" + bundle.getVersion().toString() + "-"+contextFile;
+ String originId = bundle.getSymbolicName() + "-" + bundle.getVersion().toString() + "-"+(contextFile!=null?contextFile:serviceRef.getProperty(Constants.SERVICE_ID));
ServiceApp app = new ServiceApp(getDeploymentManager(), this, bundle, properties, contextFile, originId);
app.setHandler(context); //set the pre=made ContextHandler instance
_serviceMap.put(serviceRef, app);

Back to the top