• 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 server connection info...

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm working on the developer exam, the urlybird problem.
When the server component first comes up, I need to get the location of the database, and the port from the end user so I can feed that information to RMI...I'm using RMI for networking.

My question is this...do I need to get the host information as well...shouldn't the host setting ALWAYS be localhost?

Currently, my serve rbinds without specifying the host, is this correct?
 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is the approach that I took. I only allowed the user to input the Port and location of the database file for the Server.
 
joel smither
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just want to make sure I have this right. I'm working the UrlyBird project and I I'm using RMI for networking. When I bring up the server program, I first pop up a JDialog assking the user to enter connection settings. I ask the user for the name and location of the database file, as well as the port to listen on. I'm assumming the host will ALWATS be localhost.
Can anyone ever think of a case where the host is not the local host?
 
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 Joel,

Yes, on the server side, with Sun's RMI Registry�, the host will always be localhost.

It is only on the client side you will have to request the IP / hostname of the server.

Note �: (this is a bit off topic, so feel free to ignore it) Sun's RMI Registry appears to ignore the IP address specified. This may change sometime in the future and/or other vendor's RMI Registries may behave diferently. One possible benefit of being able to specify IP addresses to listen on would mean that a single computer with multiple IP addresses could theoretically have different registries on the same port just listening to different addresses.

Regards, Andrew
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic