Meaningless Drivel is fun!*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes My user document. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "My user document." Watch "My user document." New topic
Author

My user document.

Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi rancher,
I have finished the user document which comprises 2 main part respectively devoted to operation choosing interface and booking interface. Since I am not native English speaker, so you guy feel free to give my advices. Thanks.




SCJP 1.4 SCJD
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
Your first screen is a violation of the requirements. You're not supposed to select server or client mode from the user interface.
It's an extra step that's at best annoying, at worst destructive.


42
Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi Jeroen,
In the view of a requirement from my assignment instructions:The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements., I used a combo box to list both "server" and "client" options. If you think it against the requirement, would you be kind enough to give me a solution?Thank you.
Mark Smyth
Ranch Hand

Joined: Feb 04, 2004
Posts: 288
Originally posted by Zhixiong Pan:
Hi Jeroen,
In the view of a requirement from my assignment instructions:The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements., I used a combo box to list both "server" and "client" options. If you think it against the requirement, would you be kind enough to give me a solution?Thank you.


Hi Zhixiong,

Jeroen T is right. What is the java command you use to run the program? Do you have an instruction similar to the following in your assignment.

When you submit your assignment, each part (client and server) must be executable using a command of this exact form:

java -jar <path_and_filename> [<mode>]

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 'java -jar runme.jar alone' lanches a local database and a gui client.
'java -jar runme.jar server' lanches the database server.
'java -jar runme.jar' lanches the network client and GUI.

This does exactly the same thing as what you are trying to do with your menu.

If you have such an instruction and you do not allow the application mode to be selected from the command line then this will result in an automatic failure.

regards,
Mark


SCJP<br />SCJD
Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi Mark,
Indeed thank you.
Your answer aroused some of my other potential problems.
'java -jar runme.jar server' lanches the database server.

I made a ServerRun app class in business package to start the server of RMI. Is it match what I quoted?
Mark Smyth
Ranch Hand

Joined: Feb 04, 2004
Posts: 288
Originally posted by Zhixiong Pan:
Hi Mark,
Indeed thank you.
Your answer aroused some of my other potential problems.

I made a ServerRun app class in business package to start the server of RMI. Is it match what I quoted?


Well I am not certain exactly what your project instructions say about launching the application, I would imagine that they are quite similar to the ones mentioned above.

If you instruction for launching the application are similar to my previous post, what you need is a single application class with a main method to launch the application in server, local or network mode.

Jan Heideken
Greenhorn

Joined: Dec 30, 2006
Posts: 10
Hi,
UI is a bit confusing to my eye. Why have 'search'/'display all'? Latter can be dropped. Ok, I admit that this is very minor but 'Match either Name or City' uses different name that search column itself 'Hotel Location' -> 'Match either Name or Location'.
The first panel is basically search filter like the second one(btw. panel has a typo availabel -> available). Why have two distinct criterias? Should there not be one only?
[ January 04, 2007: Message edited by: Jan Heideken ]
Jan Heideken
Greenhorn

Joined: Dec 30, 2006
Posts: 10
Btw. Thanks for noting about customer id usage. It had totally slipped my mind.
[ January 04, 2007: Message edited by: Jan Heideken ]
Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi Mark,
Your code makes thing obvious. I think my doubt are from the following statements:
'java -jar runme.jar server' lanches the database server.
'java -jar runme.jar' lanches the network client and GUI.

My question lies on the difference between "launch the database server" and "launch the network client and GUI".
May be some other topics have talked about it. If you know them, please tell me which I should read myself to get my answer. Or please explain the difference to my directly.Thanks.
Brian Kelly
Ranch Hand

Joined: Jan 04, 2007
Posts: 54
My question lies on the difference between "launch the database server" and "launch the network client and GUI".
May be some other topics have talked about it. If you know them, please tell me which I should read myself to get my answer. Or please explain the difference to my directly.Thanks.[/QB]


I found that a bit confusing too...But I believe it's:

java -jar runme.jar server - "launch the database server" - start the server in network mode.

java -jar runme.jar - "launch the network client and GUI" - start the client in network mode.

java -jar runme.jar alone - starts the server AND the client in non-network mode.


SCJA, SCJP (1.4), SCJD
Mark Smyth
Ranch Hand

Joined: Feb 04, 2004
Posts: 288
Originally posted by Zhixiong Pan:
Hi Mark,
Your code makes thing obvious. I think my doubt are from the following statements:

My question lies on the difference between "launch the database server" and "launch the network client and GUI".
May be some other topics have talked about it. If you know them, please tell me which I should read myself to get my answer. Or please explain the difference to my directly.Thanks.


Unfortunately the search function on the forum does not seem to be working at the moment so I can't find any good topics (and there are alot of good topics in this forum if you do a bit of digging.

I asked one of the moderators a few weeks ago and seems the search indexes have been getting flushed every so often for no aparent reason.

Back to your question when you start the app in server mode you simply create an instance of your database object and register it with the RMI registry the client GUI is not involved here at all.

In network mode you launch the client GUI and then attempt to lookup and connect to the running server via RMI on another machine using the network client code.

Hope this helps,
Mark.
Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Thanks Mark, I've got your point this time.
So far I have rectified my first screen. I am also hoping any of you could give me suggestions on the other tow screens. Thank you all.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: My user document.