i've committed the change from arrays to iterators. the next step is
to switch torque to load the heavy data (body and headers) upon
iteration.

loading the heavy data may fail and this failure will occur not during
the initial fetch but upon iteration. so, a strategy is needed to
handle exceptions when this happens.

a few options i can see immediately:

1. silently ignore and return null (doesn't sound like a good idea to me)
2. throw a RuntimeException (this will need to be documented and
caught to avoid closing the client connection - so not one of my
preferred option)
3. alter MessageResult (1) so that getters throw MessagingException.
when an exception occurs upon iteration, wrap and throw when the data
is requested. this will result in a much less elegant API and make
MessageResult less useful.
4. add an exception getter to MessageResult (seems inelegant)

opinions?

anyone think of anything better?

- robert

1. 
http://svn.apache.org/repos/asf/james/server/trunk/core-library/src/main/java/org/apache/james/mailboxmanager/MessageResult.java

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to