• 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

Shoud I persist the RMI registry and server ports?

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I'm done with most of the coding on the B&S project now, but I have some questions.

First, should the users be able to specify on which ports the RMI registry and server should run on, e.g.



Once the client does a lookup on the service it doesn't need to provide a port to the server, only to the remote registry, e.g.



So there is no need to ask the client for the server port, but only the host and registry port if we allow it to be other than the default 1099. It would nonetheless be good to let the server run on a user-specified port if the server runs behind a firewall.

I guess it would also be good to allow changing the name of the RMI service in both the client and server mode. This way we can connect to different services and we would also avoid RMI service name conflicts.

Thoughts on this?

Regards,

Mattew
[ August 21, 2007: Message edited by: Mattew Force ]
 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mattew,


So there is no need to ask the client for the server port, but only the host and registry port if we allow it to be other than the default 1099. It would nonetheless be good to let the server run on a user-specified port if the server runs behind a firewall.



I think you could store both the host and the server port and if you like the name of the service, normally i see than people stores host and server port and name service is fixed (I do this), i do that becuase specification tell me than it is only one server at one time so i be worried only to ask where is the server and what port are avaible (i think ask name service to client is a bit confuse for him) but maybe with good arguments you can do in your way. I'm not worried about firewall because this is out of scope of the application, this is configuration of the machines.

I hope it helps you.
 
Mattew Force
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gabriel Vargas:
Hi Mattew,



I think you could store both the host and the server port and if you like the name of the service, normally i see than people stores host and server port and name service is fixed (I do this), i do that becuase specification tell me than it is only one server at one time so i be worried only to ask where is the server and what port are avaible (i think ask name service to client is a bit confuse for him) but maybe with good arguments you can do in your way. I'm not worried about firewall because this is out of scope of the application, this is configuration of the machines.

I hope it helps you.




Hi Gabriel,

Thanks for your reply.

Do you ask the client users for the RMI service port? I don't see the need to ask client users for the server port which is specified when you call UnicastRemoteObject.exportObject(remoteService, serverPort) because the RMI registry will find the server regardless of what port it has, the clients only need to get the servers RMI registry but this is run on another port, default is 1099.

Regards,

Mattew
 
Gabriel Vargas
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mattew,

I develop my network server to ask for database location and port to start RMI registry if the default port 1099 is busy, so client need ask for host and port if the port is changed in server, i think this is not complicated and add a good functionality for a newtworked enviroment to be flexible in which port application can connect(i also put default port in 1099 in both remote server and remote client if there aren't a default properties file and stores last configuration than has worked).

The paragraph


when you call UnicastRemoteObject.exportObject(remoteService, serverPort) because the RMI registry will find the server regardless of what port it has



I don't think is true, in java.rmi.Naming documentation tells about the port on which the registry accept calls and if it isn't specified the default port used is 1099.


I hope it helps you.
 
catch it before it slithers away! Oh wait, it's a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic