Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RMI Slowness/Connect Exceptions




On Oct 30, 2005, at 12:37 PM, Greg Guerin wrote:

Stuart Woolford wrote:


Another question, why is it that mac os needs you to specify this
explicitly, because on widows it worked without it.


The simplest reason I can think of: network configuration

I still find this sort of odd. As a variation of the earlier code...

            String [] remotes = Naming.list(url);

seems very robust to tweaks in host.
I noticed a reglist command I have which is supposed to do this standalone didn't work correctly, probably since I changed my rmi port to 10099 to avoid conflicts with jboss RMI at some point.
I fixed reglist and played with it a little bit and it seems very forgiving to variations in host.


e.g.
reglist localhost 10099
reglist: listing rmi://localhost:10099
//localhost:10099/org.cmdline.RMIClient_192.168.2.1_1_
//localhost:10099/org.cmdline.RMIServer

[The client code receives output callbacks on the rmi port as well.]
or to the 192.168.2.1 IP that shows that the client picked up somewhere...
reglist 192.168.2.1 10099
reglist: listing rmi://192.168.2.1:10099
//192.168.2.1:10099/org.cmdline.RMIClient_192.168.2.1_1_
//192.168.2.1:10099/org.cmdline.RMIServer


That per netstat.

exec netstat | grep 192.168.2.1
30 Oct 2005 14:31:38,937 INFO     - RuntimeExecutable: netstat
30 Oct 2005 14:31:46,594 INFO     - Runner - [11] exec complete
System.in:16:udp4       0      0  192.168.2.1.ntp        *.*
System.in:26:udp4       0      0  192.168.2.1.domain     *.*

per ifconfig. (which doesn't grep, seems I have a bug there) it's my en0 address...

exec ifconfig
30 Oct 2005 14:52:16,269 INFO - RuntimeExecutable: ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
ether 00:14:51:03:31:9e
media: autoselect (none) status: inactive
supported media: none autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <full-duplex> 10baseT/UTP <full-duplex,hw-loopback> 100baseTX <half-duplex> 100baseTX <full-duplex> 100baseTX <full- duplex,hw-loopback>
fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 2030
lladdr 00:14:51:ff:fe:03:31:9e
media: autoselect <full-duplex> status: inactive
supported media: autoselect <full-duplex>
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
inet 206.191.206.237 --> 206.191.206.2 netmask 0xffffff00


back to listing RMI name binds if we default to what the getHost() method I showed earlier returns...
reglist: listing rmi://mini-black-box.local:10099
//mini-black-box.local:10099/org.cmdline.RMIClient_192.168.2.1_1_
//mini-black-box.local:10099/org.cmdline.RMIServer


If I use what Internet Connect actually shows, partially ###'d to disguise...
reglist 206.191.###.### 10099
reglist: listing rmi://206.191.###.###:10099
//206.191.###.###:10099/org.cmdline.RMIClient_192.168.2.1_1_
//206.191.###.###:10099/org.cmdline.RMIServer


It seems difficult for this to actually get the host wrong. Maybe some other parts of RMI work differently though.


Mike Hall mikehall at spacestar dot net http://www.spacestar.net/users/mikehall http://sourceforge.net/projects/macnative



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: RMI Slowness/Connect Exceptions (From: Greg Guerin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.