@Override
    public void stop() {
        Log.debug( "Stopping service with name '{}'.", serviceName );
        super.stop();
        // Remove the route to this service
        routingTable.removeComponentRoute(getAddress());
        // Stop the pubsub engine. This will gives us the chance to
        // save queued items to the database.
        engine.shutdown(this);
    }
Manager of entities that interact with persistent storage of data (eg: the database).
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/PubSubModule.java