• 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

default mode

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have this spec in my Assignment :

�The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run. �

In my implementation if the user does not specify any parameter, or he specifies a parameter other than �server� or �standalone�, he will receive an error notification that only �server� or �alone� must be specified.

Does this fit with the exam spec, especially this spec : �or left out entirely, in which case the network client and gui must run.� That I could not understand.
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In case that you do not specify any command line parameter, you must start a client that will connect to your server. You must specify the connection parameters , like server host, port, rmi service name (in case that you are using rmi).

Greetings,
Liviu
[ September 11, 2006: Message edited by: Liviu Carausu ]
 
Mike Tilling
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I understand that the default mode according to my exam spec is the server mode. am I wrong?

Regards
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mike Tilling:
Hi

I understand that the default mode according to my exam spec is the server mode. am I wrong?

Regards



Please go through your specs carefully. Our specs might be different.

my spces,
"The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run."

I think it is clear enough.
 
Mike Tilling
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks

We do have the same spec.
English is my second foreign language, does "left out entirely, in which case the network client and gui must run." mean that server is the default mode?

Best Regards
 
Thirumurugan Mylrajan
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mike Tilling:
Thanks

We do have the same spec.
English is my second foreign language, does "left out entirely, in which case the network client and gui must run." mean that server is the default mode?

Best Regards



No problems, let me explain.

we can have following three scenarios

1. "server" as a parm to the jar file - start the server, which is the network server for the database.

2. "alone" as parm to jar file - start the GUI client( the one which you do the booking and stuff) in local mode. This should not connect to the database server.

3. no parms ("left out entirely") - start the GUI client, but in this case it must be able to connect to the database server, which you started in point 1.
 
Mike Tilling
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Many Thanks!

In my implementation I do have two programs:

1- client.jar : The client GUI
2- server.jar : The server GUI

The server is running independently from the client, it runs without specifying any parameter, the server can run on the same machine of the client or on a different machine. The client needs to know if it will connect to the server or if it is using a local database. My question is, if we do not specify any mode for the client, is "server" the mode by default? my client GUI allows the user to specify the server name and the rmi port number.

Thanks again and
Best Regards
 
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mike

You only need only one jar(runme.jar) - this is a must, at least in my specification.
So you need to pack everything(server+client) in one jar. There is no other way.

Regards M.
 
Mike Tilling
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your quick reply

there is this spec in my assignement:
"All elements of your submission must be packaged in a single JAR file. The JAR file must have the following layout and contents in its root:
-The executable JAR containing the programs. This must be called runme.jar."

runme.jar contains the program(s) :
The runme.jar contains two programs client.jar and server.jar
I tought this fits with the exam spec.

It seems that your advice fits better with the exam spec, I've decided to follow your advice, I will create another program (class) called runme, this program will check the provided parameter:

1- if "server", the server gui will be started
2- if "alone", the client gui will be started
3- if no parameter privided, the client gui will run, the server connection settings are provided through the client gui (server name and rmi port number), in this case the server must be started somewhere by someone in the network (or on the same machine)

will I fit with your advice?

Best Regards
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic