Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2014-08-13 21:21:08 -0400
committerGreg Wilkins2014-08-13 21:21:08 -0400
commitf81bb4c000a7558ace0b64110e27fbec16de1624 (patch)
treecdfa211b621dc3ff5a20c22fd5cf7294fdeb430c /jetty-osgi/jetty-osgi-boot/src
parent98b654ba20d3a908311eb4f2bb9b350b1f2f390d (diff)
downloadorg.eclipse.jetty.project-f81bb4c000a7558ace0b64110e27fbec16de1624.tar.gz
org.eclipse.jetty.project-f81bb4c000a7558ace0b64110e27fbec16de1624.tar.xz
org.eclipse.jetty.project-f81bb4c000a7558ace0b64110e27fbec16de1624.zip
update OSGi for ssl home and base
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/OSGiServerConstants.java3
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java15
2 files changed, 13 insertions, 5 deletions
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiServerConstants.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiServerConstants.java
index b16eff92e2..4e6247dc3a 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiServerConstants.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiServerConstants.java
@@ -30,6 +30,7 @@ public class OSGiServerConstants
* configuration.
*/
public static final String JETTY_HOME = "jetty.home";
+ public static final String JETTY_BASE = "jetty.base";
/**
* System property to point to a bundle that embeds a jetty configuration
@@ -54,7 +55,7 @@ public class OSGiServerConstants
* Usual system property used as the port for https for a typical jetty
* configuration.
*/
- public static final String JETTY_PORT_SSL = "jetty.port.ssl";
+ public static final String JETTY_PORT_SSL = "ssl.port";
//for managed jetty instances, name of the configuration parameters
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java
index 8f22f9768d..32e5bf7223 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java
@@ -154,22 +154,29 @@ public class DefaultJettyAtJettyHomeHelper
List<URL> configURLs = jettyHomeDir != null ? getJettyConfigurationURLs(jettyHomeDir) : getJettyConfigurationURLs(jettyHomeBundle, properties);
LOG.info("Configuring the default jetty server with {}",configURLs);
- LOG.info("JETTY.HOME="+properties.get(OSGiServerConstants.JETTY_HOME));
+ String home=properties.get(OSGiServerConstants.JETTY_HOME);
+ String base=properties.get(OSGiServerConstants.JETTY_BASE);
+ LOG.info("JETTY.HOME="+home);
+ LOG.info("JETTY.BASE="+base);
ClassLoader contextCl = Thread.currentThread().getContextClassLoader();
try
{
Thread.currentThread().setContextClassLoader(JettyBootstrapActivator.class.getClassLoader());
+ //ensure jetty.base is set
+ if (base==null)
+ base=home;
+
// these properties usually are the ones passed to this type of
// configuration.
properties.put(OSGiServerConstants.MANAGED_JETTY_SERVER_NAME, OSGiServerConstants.MANAGED_JETTY_SERVER_DEFAULT_NAME);
Util.setProperty(properties, OSGiServerConstants.JETTY_HOST, System.getProperty(OSGiServerConstants.JETTY_HOST));
Util.setProperty(properties, OSGiServerConstants.JETTY_PORT, System.getProperty(OSGiServerConstants.JETTY_PORT));
Util.setProperty(properties, OSGiServerConstants.JETTY_PORT_SSL, System.getProperty(OSGiServerConstants.JETTY_PORT_SSL));
-
+ Util.setProperty(properties, OSGiServerConstants.JETTY_HOME, home);
+ Util.setProperty(properties, OSGiServerConstants.JETTY_BASE, base);
Server server = ServerInstanceWrapper.configure(null, configURLs, properties);
- //ensure jetty.home is set
- server.setAttribute(OSGiServerConstants.JETTY_HOME, properties.get(OSGiServerConstants.JETTY_HOME));
+
//Register the default Server instance as an OSGi service.
//The JettyServerServiceTracker will notice it and set it up to deploy bundles as wars etc

Back to the top