code: protected void writeParamsToRegistryService(SessionProvider sessionProvider) throws IOException, SAXException,
        ParserConfigurationException, RepositoryException
     {
        if (LOG.isDebugEnabled())
        {
           LOG.debug(">>> Save init parametrs in registry service.");
        }
  
        Document doc;
        try
        {
           doc = SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Document>()
           {
              public Document run() throws ParserConfigurationException
              {
                 return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
              }
           });
        }
        catch (PrivilegedActionException e)
        {
           throw (ParserConfigurationException)e.getCause();
        }
  
        Element root = doc.createElement(SERVICE_NAME);
        doc.appendChild(root);
  
        Element element = doc.createElement("nodeType");
        setAttributeSmart(element, "value", getNodeType());
        root.appendChild(element);
  
        StringBuffer sb = new StringBuffer();
        for (String workspace : observationListenerConfiguration.getWorkspaces())
        {
           if (sb.length() > 0)
           {
              sb.append(';');
           }
           sb.append(workspace);
        }
        element = doc.createElement("workspaces");
        setAttributeSmart(element, "value", sb.toString());
        root.appendChild(element);
  
        element = doc.createElement("repository");
        setAttributeSmart(element, "value", observationListenerConfiguration.getRepository());
        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