This closes #117 start/stop bootstrap classes

This commit is contained in:
Clebert Suconic 2015-02-26 08:21:43 -05:00
commit 5d72befae3
2 changed files with 8 additions and 2 deletions

View File

@ -31,6 +31,7 @@ import org.apache.activemq.integration.bootstrap.ActiveMQBootstrapLogger;
import org.apache.activemq.spi.core.security.ActiveMQSecurityManager;
import java.io.File;
import java.net.URI;
import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;
@ -62,7 +63,9 @@ public class Run implements Action
BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration);
addShutdownHook(new File(broker.server.configuration).getParentFile());
String fileName = new URI(broker.server.configuration).getSchemeSpecificPart();
addShutdownHook(new File(fileName).getParentFile());
ActiveMQSecurityManager security = SecurityManagerFactory.create(broker.security);

View File

@ -22,6 +22,7 @@ import org.apache.activemq.dto.BrokerDTO;
import org.apache.activemq.factory.BrokerFactory;
import java.io.File;
import java.net.URI;
@Command(name = "stop", description = "stops the broker instance")
public class Stop implements Action
@ -38,7 +39,9 @@ public class Stop implements Action
}
BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration);
File file = new File(broker.server.configuration).getParentFile();
String fileName = new URI(broker.server.configuration).getSchemeSpecificPart();
File file = new File(fileName).getParentFile();
File stopFile = new File(file, "STOP_ME");