MUC service should flush recent history before shutting down
When Log Room Conversation is enabled for a room the server is flushing its history to the database based on a flush setting interval (default 300 seconds). If a server is turned off before the flushing happens, all the recent history will be lost. Workaround for this is to set flushing interval very low (1-5 seconds), but this can impact performance of the server. Server should run flush operation before shutting down.
Tested. Works ok.
Updated service implementation to call the stop() method during shutdown.
It appears the Component.shutdown() method in the MultiUserChatServiceImpl class was not implemented correctly (it is empty). At a minimum this method should call logAllConversation() to dump the pending chat stanzas into the DB. However, on closer inspection it appears that the original implementation assumes the stop() method will be called during module shutdown.