Re: Connection Refused Exceptions

Rick Moynihan <[email protected]>
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
Vinod Johnson - Sun Microsystems wrote:
>>
>> I'm using the JoinManager and cover both of the cases you describe.  I
>> use a ServiceIDRecorder for registering the first service registration
>> or if I have one persisted to disk, I will use that instead.  To do this
>> I use the two constructors like so:
>>
>> if(serviceIdSet) {
>>     joinManager = new
>> JoinManager(serviceProxy,entries,serviceID,discoveryManagement,leaseRenewalManager);
>>
>>
>> } else {
>>     joinManager = new JoinManager(serviceProxy,entries,new
>> ServiceIdRecorder(),discoveryManagement,leaseRenewalManager);
>>         }
> I'll ask the obvious, but are you quite confident that your service id
> record/playback is functioning correctly? A perhaps unlikely edge case -
> is there any chance that your service gets shutdown before
> ServiceIdRecorder has been notified/completed? I'd imagine that if it is
> a case of old registrations lying around, your service browser could at
> times show more services than you expect.
>

Thanks for the suggestion though I can't see how it could be the case
with the code we've got.  Firstly the problem (ConnectException:
connection refused to host) occurs with services that have already
recorded their serviceId.  Secondly if this situation did arise the
restarted service would have a different serviceId and would not be
renewing leases on the lookup service.  This would lead to the system
cleaning itself up after the lease expiration.



--
Rick Moynihan
Software Engineer
Calico Jack LTD
http://www.calicojack.co.uk/

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.