• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hey, People, please resond to this question !!!!!!!!!

 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How should the program know if it is to be run in local or remote mode ??
I am using a command line 'String' parameter with values 'local' or 'remote'. Is this OK ?
I know that instructions with the assignment clearly state acceptable command line parameters which are 'DNS name of the server', 'Port number', 'Data file name', 'codebase property', and policy file. But instructions also say that '... the program must accept an indication that a local database is to be used ....'. Doesn't it mean that one of the parameters could be mode; i.e. local or remote ??
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe, but I just have one argument to my client, and that is a URL, if they want to run in Remote mode, otherwise no value is passed to run in Local mode.
Something as simple as that is fine.
Mark
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

most of us have the GUI (client) decide in what mode the application needs to be used.
The remote port and machine can be accepted from the client.
karthik
 
Shivaji Bhosale
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I give IP in command line for a target machine & I check for if it is the same as the local machine, if it is same, I am giving choice as selecting Standalone or Server mode of an application.
To my client, I send to the constructor depending upon selection, remote/local mode of operation. with second parameter as IP, which in local mode sent as null.
[This message has been edited by Shivaji Bhosale (edited November 25, 2001).]
 
Trevor Dunn
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Personnally I would not go against what the spec says. It says it must only take the following five command line arguments but you are adding one not in the list. They can be pretty picky when they mark the exam. What i did was non-networked mode was only one argument the location of the db and remote mode took two arguments, 1.serverip and 2. port.
You could also provide a Gui.
Trevor
 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for answering my question !!! I finally decided to derive the mode from number of command line parameters, one parameter (database file name) means local mode, two parameters (host name and port number) mean remote mode.
Thanks again !!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic