File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Locking in SCJD Beta 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 "Locking in SCJD Beta" Watch "Locking in SCJD Beta" New topic
Author

Locking in SCJD Beta

Ramesh kumaar
Ranch Hand

Joined: Mar 19, 2002
Posts: 146
Dear All,
In my assignment it says the lock method should
"lock a record so that the record is only accessible to this"
But again in the same spec thay say
"Locking must be implemented as advisory locking. That is, attempts to modify a locked
record will succeed, regardless of where the lock was given"
Which is contradictory with the first statement. If second one is the requirement what is the use of lock() method.
I mean if any one can modify the record regardless of where the lock was given then what is the need of lock() and unlock() method.
Search criteria:
----------------
Like Origin and destnation are the search criterias in case of SCJD. What can be the search criteria here in beta.
In the current spec it has the following requirement
"The User Interface must allow the user to book a selected record. This action must interact with other concurrent clients and update the database accordingly."
Do they mean to update the concurrent clients JTable while the db is updated or changed.
-rameshkumar
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Search Criteria:
Like Origin and destnation are the search criterias in case of SCJD. What can be the search criteria here in beta.
I permit to search for anything provided the search field content meets the required format.
For instance, I have the following fields (hotel room discount broker):
location: 64 bytes, any ASCII character (BoundedTextField)
name: 64 bytes, any ASCII character (BoundedTextField)
size: 4 bytes, numeric (BoundedTextField)
smoking: Y or N (JComboBox)
rate: 8 ASCII bytes with currency symbol (BoundedTextField)
date: 10 ASCII bytes following the format yyyy/mm/dd (BoundedTextField)
owner: 8 bytes numeric ID (BoundedTextField)
Note: BoundedTextField is a subclass of JTextField that does not allow to enter more characters than specified when building the field.
The user is allowed to enter almost anything in any field provided the entered data satisfies the content type of the field. It is not allowed to enter "gdhf" in the size field or "hjshsdcbhb" in the date field, for instance. Before running the search, every field is checked for content correctness and, if ok, the search is performed. This ensures that no bad content will ever be written within the DB.
A valid search, could be:
{"los",null,2,null,null,null,null}
which returns all 2-people rooms available at all locations containing "los" (Los Angeles, Los Alamos, Pablos Creek, Los Whatever, ...)
Do they mean to update the concurrent clients JTable while the db is updated or changed.
The way I see it is that there can be only one update in the DB (file) at any given time. If a record changes in the DB, the client result table need not be updated, in my opinion. Anyone else?
[ September 19, 2002: Message edited by: Valentin Crettaz ]

SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Wow Valentin, you have a totally different assignment than me.
I agree the locking in ambiguous, or however you spell it.
I just keep the same philosophy of client that locks it modifies it, I think it means that when that client calls modify, the modify method does not check to make sure it is the same client and the one that called lock. However only a client that locked a record can unlock it.
If you code lock(), read(), modify(), unlock() like in the actual SCJD, then you accomplish both goals.
I have contractors as my assignment. My search has Specialies in a drop down, and I think I will add a CheckBox for available, so that you can see all that match the specialties, or just those that match and are available.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Locking in SCJD Beta