my dog learned polymorphism*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Where Selected Network Type? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Where Selected Network Type?" Watch "Where Selected Network Type?" New topic
Author

Where Selected Network Type?

John Oconnor
Ranch Hand

Joined: Jan 12, 2011
Posts: 66

Hi , a simple question, because i am no speak english, there is a problem about my requeriment.

this is the line copy :
"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. "

So i have indicate in my properties file the mode (Stand alone, Remote) in who app will run ?.
So i have only one mode to run my app , stand alone, or remote , and not both at same time?
So if not can run both modes at same time, I do not have problem about registrt lock betwen client stand alone , and remotes clients?

So when run my app, this will see the suncertfy.property , and so know in how mode start!
(At this moment I start my app answer to user select in who mode run , stand alone o remote)

Thanks Roberto por your answers early.

Jhon


SCJP 5 - OCMJD 6 - OCPJME1MAD(SCMAD)
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4422
    
    8

Unless you've got a different set of requirements to me, the mode flag isn't something in the properties file. It should be provided on the command line.
John Oconnor
Ranch Hand

Joined: Jan 12, 2011
Posts: 66

yes, i have read more , and understand who this flag is for line command.

So when i start the app via line command, i indicate mode whit "Server" or "Alone". such as SCJD 5 Exam Book Andrew Monkhouse.

Ok in this maner I can start the app via line command.

This mode I will made the set for connection mode. because says "program must run", so I prepare via line command the mode in who run mi app.
If remote mode, init whit start server, and can conect the remote clients. If alone, so I can run my UNIQUE app. (ALONE jejeje)
Yes please confirm, becuase now I understand this topic!

thanks


Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2266
    
    3

Howdy, John!

Well, let's try to clear things up.

The execution flag indicates how the application should be run. This flag is the only command line argument that is allowed when running the application. So, it should work like this:

java -jar runme.jar server -> This should run the application in server mode, and so, the server is started and should only expect clients to connect to it.

java -jar runme.jar standalone -> This should run the application in standalone mode, and thus, the server code should not be used. The database component and the GUI must run locally. In practice, you'll have the presentation layer accessing the local business layer implementation, which will access the database component.

java -jar runme.jar -> This should run the application in client mode, accessing the server. In order for things to work, the server must already be running. In practice, you'll have the presentation layer accessing the remote business layer implementation, which is the server so to speak.

So, the mode that indicates how the application should be run is indicated in the command line when the application is started.

So if not can run both modes at same time, I do not have problem about registrt lock betwen client stand alone , and remotes clients?


Correct. No need to worry about running the application in client mode and standalone mode at the same time. In practice, it isn't expected.

Thanks Roberto por your answers early.


Count on me on your way to the OCMJD!

PS: you might also want to take a look here. This is a paper I wrote about this certification and aims to help people with doubts similar to yours.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
John Oconnor
Ranch Hand

Joined: Jan 12, 2011
Posts: 66

Thanks!!! I have break my brain!( how says the song), about the run at some time local and remote modes!!! a crazy jeje.

Well well, only need clean and document any class for finish.

Thanks Roberto from Argentina!
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5407
    
  13

John Oconnor wrote:Thanks Roberto from Argentina!

I don't think he likes that, he is from Brazil


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2266
    
    3

Roel De Nijs wrote:I don't think he likes that, he is from Brazil




That's the old rivalry because of soccer! But John, no need to worry, I never make distinctions between people due to their nationality or anything else
John Oconnor
Ranch Hand

Joined: Jan 12, 2011
Posts: 66

Roel De Nijs wrote:
John Oconnor wrote:Thanks Roberto from Argentina!

I don't think he likes that, he is from Brazil



Jejejeje, here not speak about Futbol, only Java jejeje
 
wood burning stoves
 
subject: Where Selected Network Type?