Hi Pramod.
There are a lot of questions here to answer.
I will try and answer a few as best I can. Other questions can be answered from taking a look through the forum.
In the future, Bodgitt and Scarper wants to move into Internet-based marketing, and hopes to be able to provide their services directly to customers over the web.
But in User Interface written
"It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user."
So it is not clear from spec that search should be for services ?
what to do?
I think this is just an interpretation of the specification, the way it is worded can be difficult for people not fluent in English.
Sun are not asking for web services here, just a search requirement of name and/or location on the Contractor file.
Q.2 How to implement logging in project ? did you create log file and put all log messages in that or you are displaying log messages on consooe ?
The logging you provide on the project must come from the
Java 2 platform.. take a look at the logging facilities provided by Java.
Q.3 I just declared DuplicateKeyException as signature of create method but create method is not throwing DuplicateKeyException .
is it okay ?
Depending on your particular assignment and your interpretation of the spec you may or may not throw a DuplicateKeyException . In certain circumstances I throw a DataAccessException as this seems more natural . Just make sure you put any design choices like this in your choices.txt file.
Q.4 For locking I am using java.util.concurrent.locks.Lock . I am not using threads for locking is it okay ?
Should I go for threads ?
Q.5 How to check is there any deadlock in locking ? I know we have to avoid deadlock to happen but how can I make sure there is no deadlock ?
There are quite a few recent threads on this subject in the forum and also an excellent
test class provided by Robert "JohnLennon" Perillo you can tailor to your needs.
Q.6 When user does not enter any text in Name and Location text boxes in GUI and click on Search still I am returning all records in JTable.
Is it okay ?
For me this is okay and I would search entire table as no search criteria has been passed.
Q.7 Should we provide drop down for Name and Location in GUI or text boxes are enough ?
This is a design decision you will have to make. Just make sure you document these sort of decions in your choices.txt file.
Cheers Kevin