• 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

 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the RMI working perfect, I just have to start the server maually.

How does the server get started?
It says that the program gets started using the jar file with max one argument.

I want to add a popup box for the client to enter the IP address of the server to connect with but who starts the server?
 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The server gets by running the jar file with the server argument. The client gets run by running the jar file with no argument or in standalone mode by using the alone argument.
So in summary, the jar file should contain both the server and the client.
 
Kris Reid
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm doing the URLyBird project.
It states that it can be started with no arguments or alone which uses no netwroking.

So what I have done now is when you start the program it pops a Dialog up with 2 options.

1 - start server which starts on localhost and connects to it.
2 - Enter IP address and it connects to that server

Is this a valid solution?
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kris,

Are you really sure your instruction only state two options? Mine stated three options: server, alone and none. The server option was of course to start the server.

It sounds strange to me that your instructions would not mention how to launch the server. It is not an issue Sun would want to leave to the individual candidate, I would think.

Frans.
 
Eric Chang
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with Frans, I think you should reread your assignment, as I had the URLyBird assignment as well.
 
Kris Reid
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry my mistake....it does have none, alone & server

Can I just confirm one thing.

When the user starts with none. It doesn't start the server it just tries to connect to the server and would throw an error if server is not running?

Or does it start the server as well?

Also is the server address always localhost? So is the user unable to run the program from a different machine?
 
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

When the user starts with none. It doesn't start the server it just tries to connect to the server and would throw an error if server is not running?

Or does it start the server as well?

Also is the server address always localhost? So is the user unable to run the program from a different machine?


When you start with no command line arg (none), it doesn't start the server. The server should be started in a different JVM using the server arguement. You should not assume that the server address is always going to be localhost. The user should be able to configure the IP address of the server and store this configuration in the suncertify.properties file.
 
Eric Chang
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you should be able to start the Server on a totally different machine from the Client.
Look at it this way, you are developing TWO applications, a Server and a Client, you just have to bundle them together into one application, which is run with 3 different arguments.
When you run in standalone mode, you don't want to have anything to do with the Server at all. When you run with no argument, you are just running the Client, which will attempt to connect to the Server using parameters that the User provides (via whatever method you want). When you run with the server argument, you start the Server using parameters that the User provides (again, via whatever method you want).
 
Kris Reid
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys

Do you have to use a properties file?

when started with none I have a Dialog pop up and ask for the IP or hostname of Server. It then attempts to connect.
Why would I have to save that information?
 
Eric Chang
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Again, I recommend you reread your assignment carefully. There should be a requirement that states the Server or Client must be able to run with the same settings on concurrent runs of the application. You don't want the user to have to enter in the same IP/Port/Database file location multiple times if it's the same everytime do you?
reply
    Bookmark Topic Watch Topic
  • New Topic