Re: dirty socket growth problem
Stuart <[email protected]> Wed, 7 Dec 2005 22:56:30 +0800
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <[email protected]> |
Gregg/All,
>>One common problem with custom factories is that the equals() method is
>>not
>>properly implemented. Check the documentation and your implementation to
>>make
>>sure that you are using a correct implementation so that the underlying
>>code can
>>decide that a particular socket already exists for a path of calling.
My factory classes have the following equal and hashcode method (which as
far as I am aware is fine):
public int hashCode() { return 57; }
public boolean equals(Object o) { return this.getClass() ==
o.getClass(); }
In addition I added logging to print out every time a socket is being
created. I mentioned in my original post that my factories are not being
called each time I see socket growth (instead the sockets grow when I see
the lease renewed in the RMI logs).
Thanks,
Stuart
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS". For general help, send email to
[email protected] and include in the body of the message "help".
For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html
To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html