james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Brewin" <sbre...@synsys.com>
Subject How to handle ReadOnlyUsersLDAPRepository Connection Failures
Date Fri, 02 Dec 2011 13:46:51 GMT
Hi

org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository obtains its
connection to the LDAP repository during init() processing and thereafter
assumes it to be valid. When, as may sometimes temporarily or permanently
occur, the connection becomes invalid the resulting
javax.naming.CommunicationException is propogated to the caller and no
attempt is made to reestablish the connection. James must be restarted to
reestablish the connection, which many users will consider unacceptable.

To correct this, I'm thinking of modifying
org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository in the following
ways:

1) Make the connection timeout period configurable
2) Introduce the capability to retry connections a configurable number of
times

The only downside of this I can think of is that the fast fail
ValidRcptHandler will take up to 'connection timeout period * number of
retry attempts' to respond. Still, this is better than bringing the house
down as currently happens should the LDAP repository connection be lost!

Other thoughts anyone?

Cheers
--Steve


---------------------------------------------------------------------
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