public void initialize() {
        // Load nodes to memory
        XMPPServer.getInstance().getPubSubModule().getPersistenceProvider().loadNodes(this);
        // Ensure that we have a root collection node
        if (nodes.isEmpty()) {
            // Create root collection node
            rootCollectionNode = new CollectionNode(this.getUniqueIdentifier(), null, this.serviceOwner.toString(), this.serviceOwner, collectionDefaultConfiguration);

            // Save new root node
            rootCollectionNode.saveToDB();

            // Add the creator as the node owner
            rootCollectionNode.addOwner(this.serviceOwner);
        }
        else {
            rootCollectionNode = (CollectionNode) getNode(this.serviceOwner.toString());
        }
    }
Constructs a PEPService.

@param server  the XMPP server.
@param bareJID the bare JID (service ID) of the user owning the service.
xmppserver/src/main/java/org/jivesoftware/openfire/pep/PEPService.java