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
      HelloWorld hello = new HelloWorld(client);
  
      String response = hello.sayHello();
      System.out.println("Called hello worlds service, got response:["+ response + "]");
  
      // release the client
      client.release();
    }
docs: use the resource manager