directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <>
Subject Re: Error handling: cursor time out
Date Tue, 10 May 2016 09:35:05 GMT
Le 09/05/16 16:19, Radovan Semancik a écrit :
> Hi,
> One of our engineers encountered a time-out on an LDAP connection that
> was not used for some time. The exception occured in
> This is not a very convenient place to throw an exception, but I can
> live with that. The problem is that what is thrown is literally
> LdapExcpetion:
> throw new LdapException( LdapNetworkConnection.TIME_OUT_ERROR );
> Ideally, I would like my client to transparently re-connect and
> re-start the operation when the connection timed-out. But there is no
> way for a client to detect that this was really a timeout (even the
> LdapNetworkConnection.TIME_OUT_ERROR is package-private).

We should add a LdapConnectionTimeOutException class for that purpose.

> So, obviously this needs to be fixed. My first choice was to replace
> that with throw new InvalidConnectionException. But on a second
> thought I'm not really sure about this. Is InvalidConnectionException
> the same situation as timeout? Wouldn't we want a new TimeOutException
> for this (as subclass of LdapException)? Or is there any other (e.g.
> Mina-based) mechanism for this?

View raw message