Re: JavaSpace.notify() "not reliable"

Dan Creswell <[email protected]> Sat, 12 May 2007 09:08:01 +0100
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
Hello,

Timur Mehrvarz wrote:
> 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

How have you confirmed and/or guarenteed that the master writes the
object into the space after the notify()?

> thread writes new objects into space. But at one point, my
> RemoteEventListener will simply not get called, as an effect of this.
>
> Timur
>


Dan.

===========================================================================
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