james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: James spool and threads
Date Fri, 29 Apr 2005 13:18:39 GMT
> JDBCSpoolRepository has a 60 seconds wait

Which should get terminated when notify is called().

  ref:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long)
       http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notify(
)

> the spool threads only complete 1 processor and return the mail to the
spool.

> Looking at process() in the JamesSpoolManager I removed the "return"
before
> the catch and moved the last logging line inside the catch block.

With that changem you can have multiple threads contending for that message.

If there is a fix that needs to happen, I would sooner investigate why a
spool thread isn't being woken to handle the store() call.

One possible change, hinted at in comments I left in the code, would be for
the spool manager to become single threaded, dishing off messages to worker
threads.  This would be quite similar to a common usage pattern with NIO,
should eliminate contention and synchronization issues, and improve
performance.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message