title: Multithreading a java agent
body: <p>A java agent has to upload a file in the background and return the Url of the uploaded file. While uploading, the agent has to report its progress. </p>
  
  <p>I marked the agent to be "Run in background client thread.  </p>
  
  <p>I am stuck in the following dilemma:</p>
  
  <ul>
  <li>I can run the agent from Lotus Script and pass its parameters in an In-Memory file, but the client actually doesn't run in its own thread. Instead, it blocks the whole client.</li>
  <li>I can run the agent from a formula, but then I can't pass any parameters!</li>
  <li>If I use Lotus Script and take care of the threading on my own in Java, my thread doesn't even get started!</li>
  </ul>
  
  <p>I've read that the <a href="http://www-12.lotus.com/ldd/doc/domino_notes/7.0/help7_designer.nsf/f4b82fbb75e942a6852566ac0037f284/3c005048d98917d68525704a00420a23?OpenDocument" rel="nofollow noreferrer">Notes client doesn't support multithreading</a>. But I can't make the agent RunOnServer because it is accessing a web server available only for the client.</p>
  
  <p>This is related to <a href="https://stackoverflow.com/questions/24733460/reloading-a-document-while-being-changed-by-an-agent-running-in-the-background">another question of mine</a> by the way.</p>
  
  <p>Is there any better solution for this?</p>