james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Burrell Donkin" <robertburrelldon...@gmail.com>
Subject [JSieve] Sporadic Mysterious Exceptions
Date Mon, 06 Aug 2007 19:34:42 GMT
i've been observing sporadic exceptions in my fetchmail->sieve->IMAP.
the exceptions are thrown even though the mail filtering works fine
when the script is run offline. the majority of these exceptions have
been fixed by adding read/write locking to the torque mailbox. so,
i've been able to focus on the small number left. these don't appear
to be IMAP related.

the usual symptom (for these remaining issues) is a failed check in
 i've been wondering recently whether the concurrency isn't quite
right in this class. these issues are hard to debug and tend to
require a lot of staring at the code. so hopefully, people will help
me out by lending an eye ball or two and then stating their opinions.

1 ThreadLocal is created lazily and is used without subclassing.
recommends subclassing.

2 the instance is set to nulled on a reset. in the case of concurrent
threads, a reset in one thread may lead to loss of state in another. a
reset on the instance would prevent this.

i think that it may better to eliminate the static per-thread
singleton manipulation methods and replace them with a ThreadLocal
subclass declared final. the reset would then be moved into the


can anyone think of any better approaches?

- robert

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

View raw message