This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes time-outs and server-crash Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "time-outs and server-crash" Watch "time-outs and server-crash" New topic
Author

time-outs and server-crash

puranik
Greenhorn

Joined: Aug 06, 2002
Posts: 5
I am almost done with this project. However
I scared to submit it for two reasons.
(1) I have not implemented time-outs for locks.
(2) I do not inform client in the event of
a server crash.
I would appreciate any input on how critical
these two features are.
I would like to implement the second one (at
least) and would appreciate any pointers on that.
ap
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
Originally posted by apuranik:
I am almost done with this project. However
I scared to submit it for two reasons.
(1) I have not implemented time-outs for locks.
(2) I do not inform client in the event of
a server crash.
I would appreciate any input on how critical
these two features are.
I would like to implement the second one (at
least) and would appreciate any pointers on that.
ap

Hi apuranik,
First, you might want to consider changing your name: the policy here is a first name followed by a last name. Perferably, your own.
As to your questions.
1. You don't need to, per the the instructions for the lock method. Don't worry about this.
2. If you're using rmi, the client should get an RemoteException when the server crashes. So long as you handle that, you should be fine. If you don't handle it, then you might want to display a friendly message and shutdown. Don't offer to reconnect, as it's probably out of scope. Remember, all you have to do is build the application they asked for.
HTH,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
[ August 06, 2002: Message edited by: Max Habibi ]

Java Regular Expressions
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

1. You don't need to, per the the instructions for the lock method. Don't worry about this.
2. If you're using rmi, the client should get an RemoteException when the server crashes. So long as you handle that, you should be fine. If you don't handle it, then you might want to display a friendly message and shutdown. Don't offer to reconnect, as it's probably out of scope. Remember, all you have to do is build the application they asked for.

Ditto to both 1) and 2). That's exactly how I handled that, and I got max score on the server.
Eugene.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

"apuranik"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it
here.
Thanks! and welcome to the JavaRanch!
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

And a second ditto from me on Max and Eugene's answer.
Mark
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
The only thing I would add regarding lock time outs is you might consider having your Remote connection class implement Unreferenced in case a client crashes so you can release any locks that the client holds. That will at least make those locks available again to other clients when Unreferenced is called.
Michael Morris
I am assuming you are talking about server side lock time outs. For client side, just don't worry about it. As the others said, the next call you make on the Remote interface should generate a RemoteException which you should handle as they indicated.
[ August 06, 2002: Message edited by: Michael Morris ]

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
puranik
Greenhorn

Joined: Aug 06, 2002
Posts: 5
Thank you all very much for your responses.
I think I am already handling the RemoteException.
The message (in an Error Dialog) I display is
like "Connection Refused to host XXX.XXX.XXX.XXX
nested Exception is ..."
Time-out for locks is also off my TODO list.
Additional questions
1. I have implemented a provision for
advance search. Where flights could be
search by any combination of
Flight#, Origin, Destination, Carrier,
price and Day of the week. (you could enter
none through all of these values).
Is it a scope creep and a potential candidate
for deduction of points ? (It made and still
makes so much sense to me to have it and I do
not have a heart to remove it)

My "regular" search is via two comboboxes
for Origin and Destination inputs.
2. As part of my documentation I have a Readme
and a Design-Doc. Is it absolutely necessary
to have just one Readme with the all the docs
in it ?
thanks
AP
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

1. I have implemented a provision for
advance search. Where flights could be
search by any combination of
Flight#, Origin, Destination, Carrier,
price and Day of the week. (you could enter
none through all of these values).

You mean "you could enter any through all of these values", right?

My "regular" search is via two comboboxes
for Origin and Destination inputs.

Sounds like your regular search is a subset of the criterias in the advanced search. If you want to keep the extra criteria, keep them all in a single search feature.

2. As part of my documentation I have a Readme
and a Design-Doc. Is it absolutely necessary
to have just one Readme with the all the docs
in it?

I am not sure what you mean by "just one Readme with the all the docs in it". If you are asking if the readme.txt should contain the information about location of db.db, location of design choices documents, etc., the answer is a firm "yes". Also don't forget about user documentation (separate from readme and design doc).
Eugene.
[ August 06, 2002: Message edited by: Eugene Kononov ]
puranik
Greenhorn

Joined: Aug 06, 2002
Posts: 5
quote:-----
You mean "you could enter any through all of these values", right?
---------------
Yes, thats what I had intended to say.
quote:--
Sounds like your regular search is a subset of the criterias in the advanced search. If you want to keep the extra criteria, keep them all in a single search feature.
----
You are correct the "regular" search (as per the
specs) is a subset. For regular search
the the combo-boxes are right on the top of the
Table .For 'Advance Search' a button is pressed
which pops up a small window which takes in the
extra criteria. IMHO it is similar to GUIs I
have seen. The Adv Search is not in the way of
the regular search hence I am having a difficult
time deleting it.
quote:--
I am not sure what you mean by "just one Readme with the all the docs in it". If you are asking if the readme.txt should contain the information about location of db.db, location of design choices documents, etc., the answer is a firm "yes". Also don't forget about user documentation (separate from readme and design doc).
----
great!
Thanks for your response.
ap
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
Hi A,
If I understand your second question correctly, you're asking if it's ok to have two documents. A ReadMe, and a Design_Choices. The answer is yes. Not only is it ok, it's completely necessary. As to what to feature in your ReadMe: read your directions _exactly_(they may be different then the directions others have received). Interpret them _exactly_, and submit your assignment. You can't be faulting for taking written directions literally, but you can be faulted for not following them.
Good luck,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

For regular search
the the combo-boxes are right on the top of the
Table .For 'Advance Search' a button is pressed
which pops up a small window which takes in the
extra criteria. IMHO it is similar to GUIs I
have seen.

Oh, ok, that's just fine (although not neccessary).
Eugene.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: time-outs and server-crash