Re: RMI cleanup
Gregg Wonderly <[email protected]> Fri, 1 May 2009 10:55:08 -0500
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <[email protected]> |
mvanr wrote: > I tried, but failed to reproduce the problem in a controlled development > environment. Essentially, I ran the same RMI server with a > -Djava.rmi.server.hostname=bogus argument, and several clients connecting to > it, each getting the host not found exception. Eventually, after > shortening the sleep to 100ms and with six clients running at the same time > on a machine that's only a fraction of the size of the one on which the > problem occurred, I gave up because the increase in load was not > significant. > > It seems I may be barking up the wrong tree, or at least there may be a > combination of things that caused the problem. Heaven knows what. I hope > it's gone for good. Thanks guys for your input anyway. In the world of RMI and in Jini's JERI stack (what was RMI 2.0 that didn't get accepted as JSRs 76 and 78), thread creation is not something that happens in the client in any automated way. If there were additional threads, they would have been created explicitly by logic on the client. With Jini, this sometimes happens in lookup discovery handling when a new service is discovered and a DiscoveryListener is not written correctly. In your case, you are doing the lookup explicitly in a particular bit of code. I'd suggest that you look at how new threads are pointed at that bit of code to see if there is an issue associated with the delayed success of the lookup. Were there threads spinning on a NullPointerException because the lookup had not succeeded yet, or something else that was 100% CPU bound instead of being throttled by the RPC latency to the server that would occurred had the lookup succeeded? Gregg Wonderly =========================================================================== 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