code: private void writeParamsToRegistryService(SessionProvider sessionProvider) throws IOException, SAXException,
        ParserConfigurationException, RepositoryException
     {
  
        Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
        Element root = doc.createElement(SERVICE_NAME);
        doc.appendChild(root);
  
        Element element = doc.createElement(ADMIN_INDENTITY);
        setAttributeSmart(element, "value", adminIdentity);
        root.appendChild(element);
  
        element = doc.createElement(DEFAULT_INDENTITY);
        setAttributeSmart(element, "value", defaultIdentity);
        root.appendChild(element);
  
        RegistryEntry serviceEntry = new RegistryEntry(doc);
        registryService.createEntry(sessionProvider, RegistryService.EXO_SERVICES, serviceEntry);
     }
docs: Write parameters to RegistryService.
  
  @param sessionProvider The SessionProvider
  @throws ParserConfigurationException
  @throws SAXException
  @throws IOException
  @throws RepositoryException