[Building Sakai] What happens when LDAP goes away?

Adrian Fish adrian.r.fish at gmail.com
Thu Nov 22 05:16:15 PST 2012


Hi all,

If you have an unreliable LDAP server and you have some code that calls
UserDirectoryService.getUser(userId) when LDAP is having a vague moment,
what happens? I think you get a UserNotDefinedException, even if the user
has logged into Sakai before.

The code I'm particularly thinking about is in the TII tool. We had some
strange behaviour with our LDAP the other day and 4 submissions to TII
failed. Unfortunately, we didn't have TII logging debug statements so the
'User not found' message didn't get into our logs. When a user is not found
during TII submission, the submission fails without a retry - we've patched
this locally so it retries.

Shouldn't there be an exception thrown by UserDirectoryService to indicate
that a user did exist but can't be found at the moment, to handle such a
scenario? UserGoneAwayException, something like that? If LDAP or the switch
it is behind is having a bad day, then saying the user just doesn't exist
seems a bit harsh.

Cheers,
Adrian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20121122/70bf4456/attachment.html 


More information about the sakai-dev mailing list