[
https://issues.apache.org/jira/browse/ARTEMIS-3808?focusedWorklogId=769832&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-769832
]
ASF GitHub Bot logged work on ARTEMIS-3808:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 12/May/22 19:05
Start Date: 12/May/22 19:05
Worklog Time Spent: 10m
Work Description: jbertram commented on code in PR #4061:
URL: https://github.com/apache/activemq-artemis/pull/4061#discussion_r871719745
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java:
##########
@@ -4479,5 +4483,45 @@ public void replay(String startScan, String endScan,
String address, String targ
server.replay(startScanDate, endScanDate, address, target, filter);
}
+
+ @Override
+ public void stopEmbeddedWebServer() throws Exception {
+ getEmbeddedWebServerComponent().stop(true);
+ }
+
+ @Override
+ public void startEmbeddedWebServer() throws Exception {
+ getEmbeddedWebServerComponent().start();
+ }
+
+ @Override
+ public void restartEmbeddedWebServer() throws Exception {
+ /*
+ * This needs to be run in its own thread managed by the broker because
if it is run on a thread managed by Jetty
+ * (e.g. if it is invoked from the web console) then the thread will die
before Jetty can be restarted.
+ */
+ server.getThreadPool().execute(() -> {
+ try {
+ stopEmbeddedWebServer();
+ startEmbeddedWebServer();
+ } catch (Exception e) {
+ ActiveMQServerLogger.LOGGER.failedToRestartEmbeddedWebServer(e);
+ }
+ });
+ }
+
+ @Override
+ public boolean isEmbeddedWebServerStarted() throws Exception {
+ return getEmbeddedWebServerComponent().isStarted();
+ }
Review Comment:
Agreed.
Issue Time Tracking
-------------------
Worklog Id: (was: 769832)
Time Spent: 4h 40m (was: 4.5h)
> Support starting/stopping the embedded web server via mangement
> ---------------------------------------------------------------
>
> Key: ARTEMIS-3808
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3808
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Time Spent: 4h 40m
> Remaining Estimate: 0h
>
> It would be useful to be able to cycle the embedded web server if, for
> example, one needed to renew the SSL certificates.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)