@Override
    public void start() {
        // Check that the service is enabled
        if (!isServiceEnabled()) {
            Log.info( "Not starting service with name '{}', as pubsub is disabled by configuration.", serviceName );
            return;
        }
        Log.debug( "Starting service with name '{}'.", serviceName );
        super.start();

        // Load nodes to memory
        getPersistenceProvider().loadNodes(this);

        // Ensure that we have a root collection node
        String rootNodeID = JiveGlobals.getProperty("xmpp.pubsub.root.nodeID", "");
        if (nodes.isEmpty()) {
            Log.debug( "Create a new root collection node" );
            // Create root collection node
            String creator = JiveGlobals.getProperty("xmpp.pubsub.root.creator");
            JID creatorJID = creator != null ? new JID(creator) : new JID(XMPPServer.getInstance().getServerInfo().getXMPPDomain());
            rootCollectionNode = new CollectionNode(this.getUniqueIdentifier(), null, rootNodeID, creatorJID, collectionDefaultConfiguration);
            // Add the creator as the node owner
            rootCollectionNode.addOwner(creatorJID);
            // Save new root node
            rootCollectionNode.saveToDB();
        }
        else {
            Log.debug( "Load root collection node ('{}') from database.", rootNodeID );
            rootCollectionNode = (CollectionNode) getNode(rootNodeID);
        }

        // Add the route to this service
        routingTable.addComponentRoute(getAddress(), this);
        // Start the pubsub engine
        engine.start(this);
        ArrayList<String> params = new ArrayList<>();
        params.add(getServiceDomain());
        Log.info(LocaleUtils.getLocalizedString("startup.starting.pubsub", params));
    }
Manager of entities that interact with persistent storage of data (eg: the database).
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/PubSubModule.java