On Tue, 2008-07-08 at 13:59, Gregg Wonderly wrote:
>
> I'm trying to decide at which place, it makes the most since, for renewal
> failure, to be handled. My basic concern, is that I am providing leases, which
> are "forever" leases when a client adds a listener for particular kinds of
> events that the service generates. These leases involve UDP traffic, and are
> important to allow the server to stop sending traffic when a client goes away.
>
In the general case, you need a time-based thread to fire an event at
the instant the lease expires. As the lease is renewed, you move back
the time that the expiry event will fire. Could be a periodic 'reaper'
thread or actually event-based.
In the common case where you are generating periodic events, I've always
found it reasonable to just check if the lease is expired prior to
sending out the event notification.
The renewal is a separate issue from expiring the leases and freeing the
resources.
--
Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.com--------------------------------------------------------------------------
Getting Started:
http://www.jini.org/wiki/Category:Getting_StartedCommunity Web Site:
http://jini.orgjini-users Archive:
http://archives.java.sun.com/archives/jini-users.htmlUnsubscribing: email "signoff JINI-USERS" to
listserv@...