You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2013/05/13 20:01:40 UTC
svn commit: r1481999 -
/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Author: doogie
Date: Mon May 13 18:01:39 2013
New Revision: 1481999
URL: http://svn.apache.org/r1481999
Log:
FIX: Make commons-daemon reflection access work again; this was broken
because the constructor was private, and the init(String[]) method was
removed.
Modified:
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1481999&r1=1481998&r2=1481999&view=diff
==============================================================================
--- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
+++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Mon May 13 18:01:39 2013
@@ -133,7 +133,8 @@ public final class Start {
private final AtomicReference<ServerState> serverState = new AtomicReference<ServerState>(ServerState.STARTING);
private Thread adminPortThread = null;
- private Start() {
+ /** DO NOT REMOVE: This method is needed by commons-daemon in reflection mode. */
+ public Start() {
}
private void createListenerThread() throws StartupException {
@@ -349,15 +350,21 @@ public final class Start {
}
// ----------------------------------------------- //
- // org.apache.commons.daemon.Daemon implementation //
+ // commons-daemon interface
+ // http://commons.apache.org/proper/commons-daemon/jsvc.html
// ----------------------------------------------- //
- // org.apache.commons.daemon.Daemon.destroy()
+ // DO NOT REMOVE: This method is needed by commons-daemon in reflection mode.
+ public void init(String[] args) throws StartupException {
+ init(args, true);
+ }
+
+ // DO NOT REMOVE: This method is needed by commons-daemon in reflection mode.
public void destroy() {
// FIXME: undo init() calls.
}
- // org.apache.commons.daemon.Daemon.start()
+ // DO NOT REMOVE: This method is needed by commons-daemon in reflection mode.
public void start() throws Exception {
if (!startStartLoaders()) {
if (this.serverState.get() == ServerState.STOPPING) {
@@ -371,7 +378,7 @@ public final class Start {
}
}
- // org.apache.commons.daemon.Daemon.stop()
+ // DO NOT REMOVE: This method is needed by commons-daemon in reflection mode.
public void stop() {
shutdownServer();
}