|
kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
Although a client cannot always be prevented from entering bad data into a database, under NO circumstances should a badly written client be allowed to corrupt a database or make it inconsistent.
The lock/unlock methods appear to me to represent a transactional boundary (Unit of Work pattern) that is best accesed by a Business objecs that then accesses the component(s) in the Persistence/Data Access layer in an appropriate way. For example, if the test was a Banking application and you were implementing a money transfer, you would withdraw money from account and put it in another within a single tranactional boundary, typically in one of your Business objects.
You can still come up with a correct implementation doing the locking on the client side but it is still a bad design IMO.
I think it is far more risky to take this approach than to challenge an ambiguous and possibly faulty spec by doing it correctly.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
If 80% of a server job is to serve clients requests through an exposed interface, my server also provides a GUI to let an administrator manage application, network and database settings. It provides functionalities which are not under clients control : database caching, "live" backup, lock timeouts, broadcasting of messages, database opening and shutdown, etc.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Your server provides a cached database to the clients. The fact that they cannot configure it does not mean that they are not provided with it. The fact that your internal processes also use it does not alter the fact that it is provided to the clients.
"One good thing about music - when it hits, you feel no pain" <P>Bob Marley
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
"I'm not back." - Bill Harding, Twister
Yes, it's possible to interpret this differently, and justify it.
SCJP,SCJD,SCWCD,SCBCD,SCDJWS,SCEA
"I'm not back." - Bill Harding, Twister
Anyway, this thread finished to destabilize me. I decided to get SCWCD before SCJD.
No!!! Don't quit now. Get the real certification first.
but I don't think it's worth tossing out your existing design.
Don't give up!
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
But I can understand the need to take a break
SCJP (1.4), SCWCD, SCJD
SCJP 1.2, SCWCD, SCBCD
But if Sun were failing people for writing a 3-tier solution it would be all over this forum.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Hope you will be back after your SCWCD
hope to see you back soon
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Sudhansu<br />SCJP, SCWCD, SCBCD, SCJD, SCEA, SCDJWS
SJCP, SCBCD, SJCD, SCDJWS, SCEA (Part I)
SCJP 1.2, SCWCD, SCBCD
"I'm not back." - Bill Harding, Twister
Hi Bharat,
Nothing could make me more happy than to findout that Sun is not biased towards the Two Tier model for the exam (well.. if i win a million $.. it can make me more happier !!!)
But after Tony's result, im skeptic about taking the three tier approach.
SCJP,SCJD,SCWCD,SCBCD,SCDJWS,SCEA
SCJP 1.2, SCWCD, SCBCD
Sudhansu<br />SCJP, SCWCD, SCBCD, SCJD, SCEA, SCDJWS
SCJP 1.2, SCWCD, SCBCD
It was sugested to me that I may have lost marks for not providing unbook functionality. - Tony
SJCP, SCBCD, SJCD, SCDJWS, SCEA (Part I)
"I'm not back." - Bill Harding, Twister
"I'm not back." - Bill Harding, Twister
Whip out those weird instruments of science and probe away! I think it's a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|