code: private void readParamsFromRegistryService(SessionProvider sessionProvider) throws PathNotFoundException,
        RepositoryException, RepositoryConfigurationException
     {
  
        String entryPath = RegistryService.EXO_SERVICES + "/" + SERVICE_NAME + "/" + ADMIN_INDENTITY;
        RegistryEntry registryEntry = registryService.getEntry(sessionProvider, entryPath);
        Document doc = registryEntry.getDocument();
        Element element = doc.getDocumentElement();
        adminIdentity = getAttributeSmart(element, "value");
  
        LOG.info("Admin identity is read from RegistryService");
  
        try
        {
           entryPath = RegistryService.EXO_SERVICES + "/" + SERVICE_NAME + "/" + DEFAULT_INDENTITY;
           registryEntry = registryService.getEntry(sessionProvider, entryPath);
           doc = registryEntry.getDocument();
           element = doc.getDocumentElement();
           defaultIdentity= getAttributeSmart(element, "value");
  
           LOG.info("Default identity is read from RegistryService");
        }
        catch (PathNotFoundException e)
        {
           LOG.debug("The admin identity exists but not the default identity, so we will recreate it");
           registryService.removeEntry(sessionProvider, RegistryService.EXO_SERVICES + "/" + SERVICE_NAME);
           throw e;
        }
  
        checkParams();
     }
docs: Read parameters from RegistryService.
  
  @param sessionProvider The SessionProvider
  @throws RepositoryException
  @throws PathNotFoundException
  @throws RepositoryConfigurationException