I have just got the assignment and found this nice forum with all you discussions regarding the SJCD exam! Nice that all of you are assisting each other! Hope someone can help me with my questions.
The first thing that crossed my mind was locking in non-network mode? Can one assume that 1, and only, 1 client is assessing the DB file when they run in the same WM (i.e. no networking)? If that�s the case, no locking should be used when reading and updating the DB file, right?
Thanks in advace!
Your server must be capable of handling multiple concurrent requests, and as part of this capability, must provide locking functionality as specified in the interface provided above. You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server. Any attempt to lock a resource that is already locked should cause the current thread to give up the CPU, consuming no CPU cycles until the desired resource becomes available.
However, locking the data should not be a problem when you use the client / server in one JVM at the same time.
I got the same description as you, but I still don�t get it. I think the sentence is misleading
"...You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server..."
What does it mean?
I mean "... at MOST one program is accessing...", what does that mean? MOST???
My plan was to ignore any locking mechanism when running in "non-network mode". I.e. The Gui is accessing some service methods which are not doing any locking (the service methods access the DBMain). I will also have service methods which accessing the DBMain in network mode but these will use locking.
So, can my system access the db methods (in DBMain) via my nonlocking service methods? That is, can I assume the non-network mode consists of only 1 client?
Thanks in advance!
Thanks for you answer!
You apparently missed our Naming Policy on the way in. Please read that page, then follow the link there to change your screen name.