Open GoogleCodeExporter opened 8 years ago
https://jira.springsource.org/browse/INT-1942?focusedCommentId=68309#comment-683
09
please take a look at the thread. it is discussing about the problem.
Original comment by qiaojunw...@gmail.com
on 11 Jul 2011 at 9:01
We originally suspected that there is a problem with the spring mail
integration library, but after investigating a little bit (and with the help
from the spring community) we realized that the problem is in exjello library.
The root problem is that the connection for exchange times out (I don't have a
good explanation why that happens - could be just a security measure for the
exchange server we use).
In terms of code, as Oleg Zhurakousky of springsource pointed out, the
following piece of code fails on us (method listFolder in ExchangeConnection):
int status = client.executeMethod(op);
stream = op.getResponseBodyAsStream();
if (status >= 300) {
throw new IllegalStateException("Unable to obtain " + folder + ".");
}
What I did as a workaround is the following (all changes are in
ExchangeConnection):
- created a method that checks if the user is authenticated (isAuthenticated).
- changed the isConnected method to enforce a reconnect:
if (!isAuthenticated()) {
connect();
}
Of course, this is a workaround (with some hazardous potential) and a cleaner
solution needs to be elaborated, but I think that the concept/direction is
pretty good: don't let exceptions run away from exjello if session timed out
(HTTP 440).
I am attaching my version of ExchangeConnection - please don't use it as it is,
as I didn't do deep testing for it.
Original comment by cristian...@gmail.com
on 14 Jul 2011 at 9:23
Attachments:
Original issue reported on code.google.com by
qiaojunw...@gmail.com
on 13 Jun 2011 at 8:25