code: public String[] getNextPID(Context context, int numPIDs, String namespace)
              throws ServerException {
          try {
              CreatorJournalEntry cje =
                      new CreatorJournalEntry(METHOD_GET_NEXT_PID, context);
              cje.addArgument(ARGUMENT_NAME_NUM_PIDS, numPIDs);
              cje.addArgument(ARGUMENT_NAME_NAMESPACE, namespace);
              return (String[]) cje.invokeAndClose(delegate, writer);
          } catch (JournalException e) {
              throw new GeneralException("Problem creating the Journal", e);
          }
      }
docs: Create a journal entry, add the arguments, and invoke the method.