Re: JavaSpace.notify() "not reliable"

Timur Mehrvarz <[email protected]> Fri, 11 May 2007 12:07:55 +0200
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
On 11.05.2007, at 05:19, Gregg Wonderly wrote:

> Timur Mehrvarz wrote:
>> Hi. While looking for a solution to a problem, I found this [1]:
>>   "Many people get hung up on JavaSpace.notify() because it is  
>> “not  reliable”. This needs careful explanation - most JavaSpaces  
>> will  endeavour to deliver all appropriate events to a client. If  
>> the  client becomes permanently unavailable  
>> (NoSuchObjectException)  further events will not be delivered to it."
>> Everything is working fine for me, for a while. But from a random   
>> moment on, my EventListener will not get called anymore, when  
>> they  should. I don't think I am getting NoSuchObjectExceptions.  
>> My Jini VM  and my apps VM are running side by side on the same  
>> intel Linux box.  I am using plain Jini2_1 with transient Outrigger.
>
> Are you using the returned value from notify to get the associated  
> Lease,

Yes.

> and then passing that off to a LeaseRenewalManager, or otherwise  
> renewing it?

I do not renew my Lease. I usually need to apply a different search  
template, everytime I call notify(). So I cancel() the lease, take()  
the object from space, start a new notify() and do a wait(). I can  
see how the worker thread is always calling the notify(), before the  
master thread writes new objects into space. But at one point, my   
RemoteEventListener will simply not get called, as an effect of this.

Timur

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVASPACES-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

To view past JAVASPACES-USERS postings, please see:
http://archives.java.sun.com/archives/javaspaces-users.html