river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Reedy <dennis.re...@gmail.com>
Subject Re: LookupLocator and ServiceRegistrar
Date Wed, 02 Jan 2013 16:26:10 GMT

On Jan 2, 2013, at 1056AM, Dan Creswell wrote:

> Oh yeah, I remember this one!
> 
> I reckon we could avoid that table with a simple exponential back-off
> algorithm and then have a means to cap/set a maximum period of time
> programmatically or via config or both.

What I did was to modify the default behavior of the LookupLocatorDiscovery utility to create
an internal DiscoveryListener that will create a LookAliveTask per discovered LookupService
instance. Each LookupAliveTask will periodically invoke the ServiceRegistrar.getLocator()
method (resulting in a round trip to the backend implementation). If a non recoverable exception
occurs (ConnectException or otherwise) the LookAliveTask will discard the ServiceRegistrar
in question. The periodicity of the LookupAliveTask can be controlled by the net.jini.unicast.interval
system property. The default interval is 1 minute.

The modified LookupLocatorDiscovery source is attached.

Dennis


Mime
View raw message