Originally posted by Svetlana Koshkina:
I have two connected computers at home. I found out that RMI works absolutely the same for loopback and for the another comp. address. If it did not work properly for loopback address, it id not work for the LAN. So, i gave up testing it over network real quck because it meant to transfer client all the time. Out curiosity, it was ok.
:roll:
Sun Certified Java Web Component Developer for J2EE v1.4<br />Sun Certified Java Developer for J2SE v1.4<br />Sun Certified Java Programmer for J2SE v1.4
Originally posted by damu liu:
I tried your way, but it doesn't work. Maybe I didn't fully understand your method , can you put it more clearly? Thanks.
Sun Certified Java Web Component Developer for J2EE v1.4<br />Sun Certified Java Developer for J2SE v1.4<br />Sun Certified Java Programmer for J2SE v1.4
Originally posted by damu liu:
I tried again, it's ok. But I want to try it on www, did you test your assignment on www?
Sun Certified Java Web Component Developer for J2EE v1.4<br />Sun Certified Java Developer for J2SE v1.4<br />Sun Certified Java Programmer for J2SE v1.4
Originally posted by damu liu:
But my computer has not a stable IP, it will change every time when I get on web. How does the client know the IP? In addition, the hostname is given by myself, even if I set the property, it is an environment variable on my computer, how can others look up it?
How do you test your app? Waiting for your reply, thank you.
Sun Certified Java Web Component Developer for J2EE v1.4<br />Sun Certified Java Developer for J2SE v1.4<br />Sun Certified Java Programmer for J2SE v1.4
Originally posted by Paul Tongyoo:
Hi Svetlana,
I don't fully understand your last sentence, but if it said that you are not going to try testing your server with a client outside your LAN then I highly suggest you reconsider-- it may be possible that, if you're on a LAN whose router may be distributing NAT addresses (192.168.1.*) to connected computers, your RMI server might be identifying itself to clients with the default IP of its host computer - which will be its NAT address. If this case applies to you, you may find that clients on your LAN will be able to connect to the server fine, but clients outside your LAN will experience a ConnectException since your server's NAT address is not reachable via their external network connection.
If this doesn't apply to you, or I totally misunderstood what you were saying, I deeply apologize!In case this does apply to you, you can programmatically set the system property "java.rmi.server.hostname" to the IP address of your router, and point all client requests to that IP address.
Regards,
Paul
Originally posted by Svetlana Koshkina:
...
it is not neccessary to go into troubles and test the program over network if your loopback is working, network will be also fine assuming that 1. your client identifies the server's address correctly (my user filled out 'server's ip address' textfield where 'localhost' was default) and 2. your client is not behind firewall.
...
It is even more difficult to test RMI over www. It will be far beyond the assignment requirements. Read the book: "Java RMI". You'll have to implement HTTP tunneling.
...
Sun Certified Java Web Component Developer for J2EE v1.4<br />Sun Certified Java Developer for J2SE v1.4<br />Sun Certified Java Programmer for J2SE v1.4
Restrictions on RMI
To avoid unnecessary complexity in the marking environment certain restrictions are placed on solutions that use RMI. Specifically:
You must not require the use of an HTTP server.
You must not require the installation of a security manager.
You must provide all classes pre-installed so that no dynamic class downloading occurs.
You must use RMI over JRMP (do not use IIOP)
Originally posted by Philippe Maquet:
You must not require the use of an HTTP server.
Sun Certified Java Web Component Developer for J2EE v1.4<br />Sun Certified Java Developer for J2SE v1.4<br />Sun Certified Java Programmer for J2SE v1.4
But I sense we are interpretting this restriction in different ways -- do you suggest that this specification is stating that our program is not supposed to function over the www?
Sun Certified Java Web Component Developer for J2EE v1.4<br />Sun Certified Java Developer for J2SE v1.4<br />Sun Certified Java Programmer for J2SE v1.4
If you try to please everybody, your progress is limited by the noisiest fool. And this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
|