• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI questions

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,
I have a couple of question concerning RMI:
Right now I have been able to start my server and run my application on my PC.
Here are my questions:

1) I have been able to run in a connection mode if I use "localhost" it does not work if I use my IP adress.


By the way my IP adress is dynamic: how do you workk around this? What adress do you give in your application if your IP adress may change?

2) I have tried the same thing on an other PC ( window 98), and I cannot start my server. Do I need to have to install j2sdk? or should it work with j2re?)

I would like then to test this while running the server and the application on different machine.

All of your inputs are welcome
Thank you

Lydie
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even with a dynamic IP address, you should still be able to find out what it is with ipconfig.
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lydie,

You should not specify an IP address for registering your server, because it will implicitly run on the local host.

Of course for the client you need to specify a server address to connect to and this must be the host address where you launched the server. This can be "localhost" (or 127.0.0.1) if you launch your client on the same machine. If you launch it on a different machine, use the ipconfig on the server machine to find out it's IP address.

Frans.
 
lydie prevost
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you , I am going to try this
- Lydie
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Subsequent to this question, here's what I am doing.

1. I use the hostname (not the IP Address) while registering my RMI object. This means my network client also needs to use that in the lookup string. Otherwise lookup fails.

2. Is it expected that we do a DNS translation to deduce the hostname from the IP address before trying to lookup the remote object (if the examiner decides to do enter the ip address instaed of hostname)?

regards

Vrinda.
 
lydie prevost
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, but I am still confused:
ipconfig gives the local IP adress = local network
which is not the IP adress from the outside word!
Is is what you are talking about with DNS tarnslation?
Ans how do you this DNS transalation?
Right now ny client server works fine on a local network:
I use the ip given by ipconfig in my clinet and nothing in my server. But this does not work outside my local network!
- Lydie
 
Vrinda Werdel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
could you tell me what you mean by "outside the local network"?

Does your client run in a DMZ or beyond the firewall?

Vrinda
 
lydie prevost
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well, I am behind a firewall : so when I run ipconfig i get an ip adress which is not the one I am know outside, yhey usully begin with 192.168....
I know my server name .
I know my "face IP" = the know outside the firewall
But I am not able to put alll of this together .
Here is a good efrerence about ip /ip face dns server etc....ip adress
- Lydie
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lydie,

You may find the answer in jGuru: Remote Method Invocation (RMI), under the section on Firewall Issues. I have a vague memory of using that technique myself around 2 years ago, but I no longer have a setup I can test this on.

Regards, Andrew
 
reply
    Bookmark Topic Watch Topic
  • New Topic