This closes #117 start/stop bootstrap classes
This commit is contained in:
commit
5d72befae3
|
@ -31,6 +31,7 @@ import org.apache.activemq.integration.bootstrap.ActiveMQBootstrapLogger;
|
||||||
import org.apache.activemq.spi.core.security.ActiveMQSecurityManager;
|
import org.apache.activemq.spi.core.security.ActiveMQSecurityManager;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.net.URI;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
@ -62,7 +63,9 @@ public class Run implements Action
|
||||||
|
|
||||||
BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration);
|
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);
|
ActiveMQSecurityManager security = SecurityManagerFactory.create(broker.security);
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ import org.apache.activemq.dto.BrokerDTO;
|
||||||
import org.apache.activemq.factory.BrokerFactory;
|
import org.apache.activemq.factory.BrokerFactory;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.net.URI;
|
||||||
|
|
||||||
@Command(name = "stop", description = "stops the broker instance")
|
@Command(name = "stop", description = "stops the broker instance")
|
||||||
public class Stop implements Action
|
public class Stop implements Action
|
||||||
|
@ -38,7 +39,9 @@ public class Stop implements Action
|
||||||
}
|
}
|
||||||
BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration);
|
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");
|
File stopFile = new File(file, "STOP_ME");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue