Sharing BOSH context should not prevent context restart.

Description

https://igniterealtime.atlassian.net/browse/OF-1326#icft=OF-1326 introduces changes that relate to sharing the web context on which BOSH is running with other components (such as plugin-provided components).

Adding handlers through the newly introduced {{addJettyHandler}} in HttpBindManager, causes a problem to occur when the manager is restarted:

2017.11.21 12:35:01 org.jivesoftware.util.CertificateManager - A listener threw an exception while processing a 'store changed' event. java.lang.IllegalStateException: STARTED at org.eclipse.jetty.server.handler.HandlerWrapper.setServer(HandlerWrapper.java:110) at org.eclipse.jetty.server.handler.ContextHandler.setServer(ContextHandler.java:280) at org.eclipse.jetty.webapp.WebAppContext.setServer(WebAppContext.java:1307) at org.eclipse.jetty.server.handler.HandlerCollection.setServer(HandlerCollection.java:146) at org.eclipse.jetty.server.handler.HandlerCollection.setServer(HandlerCollection.java:146) at org.eclipse.jetty.server.handler.HandlerWrapper.setHandler(HandlerWrapper.java:84) at org.jivesoftware.openfire.http.HttpBindManager.start(HttpBindManager.java:220) at org.jivesoftware.openfire.http.HttpBindManager.restartServer(HttpBindManager.java:812) at org.jivesoftware.openfire.http.HttpBindManager.storeContentChanged(HttpBindManager.java:872) at org.jivesoftware.util.CertificateManager.fireCertificateStoreChanged(CertificateManager.java:377) at org.jivesoftware.openfire.keystore.CertificateStore.reload(CertificateStore.java:93) at org.jivesoftware.openfire.keystore.CertificateStoreWatcher$1.run(CertificateStoreWatcher.java:86) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622) at java.lang.Thread.run(Thread.java:748)

 
The above exception is triggered (but not caused) by a change to the keystore, making use of functionality introduced in OF-1373.

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created November 23, 2017 at 12:28 PM
Updated November 24, 2017 at 12:34 PM
Resolved November 24, 2017 at 12:34 PM

Flag notifications