GeeCON Prague 2014*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Mode flag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Mode flag" Watch "Mode flag" New topic
Author

Mode flag

Wickes Potgieter
Ranch Hand

Joined: Apr 05, 2002
Posts: 68
My instructions:

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 am not sure what they mean by this statement?


Wickes Potgieter<br />SCJP<br />BEA Certified Specialist: Server, Integration, Portal, Tuxedo<br />BEA WebLogic Server 7 Certified Enterprise Developer<br />BEA Certified Architect<br /><a href="http://www.bea.com" target="_blank" rel="nofollow">www.bea.com</a>
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Wickes,
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 am not sure what they mean by this statement?

I think that this recent thread replies to your question.

Regards,

Phil.
Wickes Potgieter
Ranch Hand

Joined: Apr 05, 2002
Posts: 68

default mode(no flag): Client runs expecting to connect via network.

"server" flag: Server runs expecting connections via network only.

"standalone" flag: Client and server both run in non-networked mode.


When my client starts I display a Dialog box so that the user can choose between a local or a remote database graphically. So, I don't see the need for the "standalone" flag. Should I put it in anyway?
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Wickes,
When my client starts I display a Dialog box so that the user can choose between a local or a remote database graphically. So, I don't see the need for the "standalone" flag. Should I put it in anyway?

I wouldn't do that: supporting the application mode through a command-line argument is a must-be instruction, which makes your GUI support of the same feature useless. Just IMO.

Regards,

Phil.
Wickes Potgieter
Ranch Hand

Joined: Apr 05, 2002
Posts: 68
ok, I see your point. So, I should rather support the mode flag and then pop up a dialog on startup to get the file location or the server location?
Anton Golovin
Ranch Hand

Joined: Jul 02, 2004
Posts: 476
Originally posted by Wickes Potgieter:
ok, I see your point. So, I should rather support the mode flag and then pop up a dialog on startup to get the file location or the server location?


Yes. The program must start in the right mode from the command-line flag; but the configuration specifics for each mode is up to you.


Anton Golovin (anton.golovin@gmail.com) SCJP, SCJD, SCBCD, SCWCD, OCEJWSD, SCEA/OCMJEA [JEE certs from Sun/Oracle]
Wickes Potgieter
Ranch Hand

Joined: Apr 05, 2002
Posts: 68
Thank you for the help!
 
GeeCON Prague 2014
 
subject: Mode flag