code: public static void useResource(String host, int port, String user, String password, Authentication authType)
      throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
    {
      // create the client
      DatabaseClient client = DatabaseClientFactory.newClient(host, port, user, password, authType);
  
      // create the resource extension client
      DictionaryManager dictionaryMgr = new DictionaryManager(client);
  
      // specify the identifier for the dictionary
      String uri = "/example/metasyn.xml";
  
      // create the dictionary
      String[] words = {
        "foo", "bar", "baz", "qux", "quux", "wibble", "wobble", "wubble"
      };
      dictionaryMgr.createDictionary(uri, words);
  
      System.out.println("Created a dictionary on the server at "+uri);
  
      // check the validity of the dictionary
      Document[] list = dictionaryMgr.checkDictionaries(uri);
      if (list == null || list.length == 0)
        System.out.println("Could not check the validity of the dictionary at "+uri);
      else
        System.out.println(
          "Checked the validity of the dictionary at "+uri+": "+
            !"invalid".equals(list[0].getDocumentElement().getNodeName())
        );
  
      dictionaryMgr.getMimetype(uri);
      // use a resource service to check the correctness of a word
      String word = "biz";
      if (!dictionaryMgr.isCorrect(word, uri)) {
        System.out.println("Confirmed that '"+word+"' is not in the dictionary at "+uri);
  
        // use a resource service to look up suggestions
        String[] suggestions = dictionaryMgr.suggest(word, null, null, uri);
  
        System.out.println("Nearest matches for '"+word+"' in the dictionary at "+uri);
        for (String suggestion: suggestions) {
          System.out.println("    "+suggestion);
        }
      }
  
      // delete the dictionary
      dictionaryMgr.deleteDictionary(uri);
  
      // release the client
      client.release();
    }
docs: use the resource manager