Multi-threaded java agents doesn't seem to be multi-threaded?

Hi! I wrote a lotus script agent to delete all documents for all mailboxes on a server. This turned out to be extremely slow. So I changed the agent into a multi-threaded java agent. Now I have multiple threads deleting documents in different mail databases, but it does not appear to be happening simulataneously i.e the other threads seems to be waiting for one thread to delete its document, then the next thread starts.

Is the DocumentCollection.removeAll function is any way locked to limit one per agent. I mean it will only take one request at a time from an agent, so even If I have 5 threads calling the same function it will happen sequentially.

Hope what I said makes sense.

In any case I want to delete all documents for a very large number of databases (2000) as quickly as possible. Any other ideas?

Subject: Multi-threaded java agents doesn’t seem to be multi-threaded?

Help!! Anyone!?

Subject: Multi-threaded java agents doesn’t seem to be multi-threaded?

Depending on how you have the agent coded, you may be locking yourself into an effectively single threaded solution. And unless the machine running the agent is an SMP box, the gains from this will be minimal, the machine can only do one thing at a time, and the individual requests are probably going to complete before the thread gets preempted to run another thread, so it will look like one thread at a time. But it’s impossible to tell from your description. If you are saying that each of the 5 threads runs to completion before the next thread runs, then that sounds more like a programming error or design flaw in your agent.

Post the code and we’ll have a look at what you have.

Joseph Millar

Principal Software Engineer

Brightline Technology