Commit 1651273a authored by Tom Evans's avatar Tom Evans Committed by tevans

OF-730: Migrate additional system properties to support scripted deployments

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13926 b35dd754-fafc-0310-a699-88a17e54d16e
parent 34ed8456
...@@ -350,13 +350,12 @@ public class XMPPServer { ...@@ -350,13 +350,12 @@ public class XMPPServer {
private void initialize() throws FileNotFoundException { private void initialize() throws FileNotFoundException {
locateOpenfire(); locateOpenfire();
name = JiveGlobals.getProperty("xmpp.domain", "127.0.0.1").toLowerCase();
try { try {
host = InetAddress.getLocalHost().getHostName(); host = InetAddress.getLocalHost().getHostName();
} }
catch (UnknownHostException ex) { catch (UnknownHostException ex) {
Log.warn("Unable to determine local hostname.", ex); Log.warn("Unable to determine local hostname.", ex);
host = "127.0.0.1";
} }
version = new Version(3, 9, 2, Version.ReleaseStatus.Alpha, -1); version = new Version(3, 9, 2, Version.ReleaseStatus.Alpha, -1);
...@@ -379,6 +378,11 @@ public class XMPPServer { ...@@ -379,6 +378,11 @@ public class XMPPServer {
Log.error(e.getMessage(), e); Log.error(e.getMessage(), e);
} }
JiveGlobals.migrateProperty("xmpp.domain");
name = JiveGlobals.getProperty("xmpp.domain", host).toLowerCase();
org.jivesoftware.util.Log.setDebugEnabled(JiveGlobals.getXMLProperty("log.debug.enabled", false));
initialized = true; initialized = true;
} }
......
...@@ -157,6 +157,10 @@ public class IQRegisterHandler extends IQHandler implements ServerFeaturesProvid ...@@ -157,6 +157,10 @@ public class IQRegisterHandler extends IQHandler implements ServerFeaturesProvid
// Add the registration form to the probe result. // Add the registration form to the probe result.
probeResult.add(registrationForm.getElement()); probeResult.add(registrationForm.getElement());
} }
JiveGlobals.migrateProperty("register.inband");
JiveGlobals.migrateProperty("register.password");
// See if in-band registration should be enabled (default is true). // See if in-band registration should be enabled (default is true).
registrationEnabled = JiveGlobals.getBooleanProperty("register.inband", true); registrationEnabled = JiveGlobals.getBooleanProperty("register.inband", true);
// See if users can change their passwords (default is true). // See if users can change their passwords (default is true).
......
...@@ -130,6 +130,18 @@ public final class HttpBindManager { ...@@ -130,6 +130,18 @@ public final class HttpBindManager {
private HttpBindManager() { private HttpBindManager() {
// JSP 2.0 uses commons-logging, so also override that implementation. // JSP 2.0 uses commons-logging, so also override that implementation.
System.setProperty("org.apache.commons.logging.LogFactory", "org.jivesoftware.util.log.util.CommonsLogFactory"); System.setProperty("org.apache.commons.logging.LogFactory", "org.jivesoftware.util.log.util.CommonsLogFactory");
JiveGlobals.migrateProperty(HTTP_BIND_ENABLED);
JiveGlobals.migrateProperty(HTTP_BIND_PORT);
JiveGlobals.migrateProperty(HTTP_BIND_SECURE_PORT);
JiveGlobals.migrateProperty(HTTP_BIND_THREADS);
JiveGlobals.migrateProperty(HTTP_BIND_FORWARDED);
JiveGlobals.migrateProperty(HTTP_BIND_FORWARDED_FOR);
JiveGlobals.migrateProperty(HTTP_BIND_FORWARDED_SERVER);
JiveGlobals.migrateProperty(HTTP_BIND_FORWARDED_HOST);
JiveGlobals.migrateProperty(HTTP_BIND_FORWARDED_HOST_NAME);
JiveGlobals.migrateProperty(HTTP_BIND_CORS_ENABLED);
JiveGlobals.migrateProperty(HTTP_BIND_CORS_ALLOW_ORIGIN);
PropertyEventDispatcher.addListener(new HttpServerPropertyListener()); PropertyEventDispatcher.addListener(new HttpServerPropertyListener());
this.httpSessionManager = new HttpSessionManager(); this.httpSessionManager = new HttpSessionManager();
......
...@@ -73,6 +73,10 @@ public class HttpSessionManager { ...@@ -73,6 +73,10 @@ public class HttpSessionManager {
* Creates a new HttpSessionManager instance. * Creates a new HttpSessionManager instance.
*/ */
public HttpSessionManager() { public HttpSessionManager() {
JiveGlobals.migrateProperty("xmpp.httpbind.worker.threads");
JiveGlobals.migrateProperty("xmpp.httpbind.worker.timeout");
this.sessionManager = SessionManager.getInstance(); this.sessionManager = SessionManager.getInstance();
// Configure a pooled executor to handle async routing for incoming packets // Configure a pooled executor to handle async routing for incoming packets
......
...@@ -335,6 +335,12 @@ public class PubSubModule extends BasicModule implements ServerItemsProvider, Di ...@@ -335,6 +335,12 @@ public class PubSubModule extends BasicModule implements ServerItemsProvider, Di
@Override @Override
public void initialize(XMPPServer server) { public void initialize(XMPPServer server) {
super.initialize(server); super.initialize(server);
JiveGlobals.migrateProperty("xmpp.pubsub.enabled");
JiveGlobals.migrateProperty("xmpp.pubsub.service");
JiveGlobals.migrateProperty("xmpp.pubsub.root.nodeID");
JiveGlobals.migrateProperty("xmpp.pubsub.root.creator");
JiveGlobals.migrateProperty("xmpp.pubsub.multiple-subscriptions");
// Listen to property events so that the template is always up to date // Listen to property events so that the template is always up to date
PropertyEventDispatcher.addListener(this); PropertyEventDispatcher.addListener(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment