private void finalSetupSteps() {
        for (String propName : JiveGlobals.getXMLPropertyNames()) {
            if (!XML_ONLY_PROPERTIES.contains(propName)) {
                if (JiveGlobals.getProperty(propName) == null) {
                    JiveGlobals.setProperty(propName, JiveGlobals.getXMLProperty(propName));
                }
                JiveGlobals.setPropertyEncrypted(propName, JiveGlobals.isXMLPropertyEncrypted(propName));
            }
        }

        // Check if keystore (that out-of-the-box is a fallback for all keystores) already has certificates for current domain.
        CertificateStoreManager certificateStoreManager = null; // Will be a module after finishing setup.
        try {
            certificateStoreManager = new CertificateStoreManager(true);
            certificateStoreManager.initialize( this );
            certificateStoreManager.start();
            final IdentityStore identityStore = certificateStoreManager.getIdentityStore( ConnectionType.SOCKET_C2S );
            identityStore.ensureDomainCertificate();

        } catch (Exception e) {
            logger.error("Error generating self-signed certificates", e);
        } finally {
            if (certificateStoreManager != null)
            {
                certificateStoreManager.stop();
                certificateStoreManager.destroy();
            }
        }

        // Initialize list of admins now (before we restart Jetty)
        AdminManager.getInstance().getAdminAccounts();
    }
Removes a server listener that was being notified when the server was being started
or was about to be stopped.

@param listener the server listener to remove.
xmppserver/src/main/java/org/jivesoftware/openfire/XMPPServer.java