Colin O'Toole

Greenhorn
+ Follow
since Apr 15, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Colin O'Toole

Cheers Anton, I'm sure you're right - it was just a real d'oh! moment.

Thanks for the support, I'll have a beer and forget about it
Sure, from the GUI it's impossible, but perhaps Sun are using an automated test harness to call Data methods that the GUI doesn't use (create and delete). If they're adding records via the Data create method, they may test how the server will handle invalid records. Certainly I would, but then I'm paranoid.

But alas, not paranoid enough it seems . Hopefully the automated testing process isn't that complete.

Ah well, no use crying over spilt milk.
Hi all,

Oh dear.

I submitted my project last week and was literally walking down the road today when it hit me that I'd completely forgotten to put in any checks in the create method for null record fields.

I am checking to ensure that the string array itself is not null and the string array is the right length for the schema. However, having a null field just slipped my mind and in all my unit testing I don't have one which tests this condition.

Sure enough I tested if when I got home and my file writing code throws a NPE in this situation. A stupid omission I know but is this enough to fail me automatically?

The moral of the story: when you're really really sure you're finished and it works perfectly, wait another week (or two) and THEN submit.

Colin.
Thanks for that Mark,

Well the possible actions are:

- Search for a record using the current values in the name/location comboboxes. I have a button for this, which is located close to the comboboxes that "drive" it. I don't see the utility of placing it in a menu as well.

- Book a record using the customer id entered in the provided text field. I feel the same about this as I do about the search button.

- I don't allow the client to change the location of the database (in local mode) or the ip of the server (in network client mode) once the inital selection has been made and the main GUI is started. So there are no menu items for this.

Hmmm.... well I'm pretty happy that I can survive without menu items/toolbars. I hope the examiner agrees.

Colin.
Hi all,

I've pretty much finished my GUI and I'd appreciate opinions on anything I've missed/left out

So I have:
- A table of data
- Search panel with 2 comboboxes containing name and location, plus a search button.
- Book panel with a text field for inputting customerId number and a book button. - Menu with one option - File->Quit.

Things that I've done:
- The customer Id text field is masked to only accept 8-digit numeric as per the requirements. It also has a history of the previous ids entered.
- The book button is disabled if the user selects a record from the table which has already been booked, or if the search returns no records.
- Tab order allows keyboard navigation.
- Resize works fine.
- Tooltips are there and change if a control is disabled for any reason.

Things I haven't done:
- Extra menu items. It's such a simple GUI I really didn't see the point.
- Toolbars. Again I'm not sure what I'd put in a toolbar. I don't feel like adding one just for the sake of it.
- Any graphics of any sort.
- No multiple select on the table. So the CSR cannot book multiple records at once.

Any opinions on the above?

Cheers,

Colin.
Congrats to Ashish, Andrew, & Karthik!
From my memory the correct answers are
1. B
2. B
3. A D E F
4. D
For question 2, I believe that home methods in a CMP bean class cannot throw the java.rmi.RemoteException exception (note that I'm not talking about method declarations in the home interface). It is late however and I've been painting all day so I'll confirm this tomorrow when I'm more awake.
Thanks all for answering!
Colin.
Hi all,
Just some quick ones, please be nice when replying
Well it's the end of the day here in Ireland. Now I'm off to paint my new house for the weekend - no study for me
cheers
Colin.
1. Which of the following statements about business methods in a bean class is incorrect [choose 1]:
A. The signature requirements for business methods are always the same for both session and entity beans.
B. The argument and return types must always be legal types for the Java RMI API.
C. The throws clause may include any exceptions defined by your application.
D. A business method should always throw the javax.ejb.EJBException to indicate a system-level problem.
2. Which of the following statements about Home methods in a bean class is incorrect for Container Managed Persistence [choose 1]:
A: The method must not access relationships.
B. The throws clause of the method may include the java.rmi.RemoteException.
C. The method must not access the bean's persistence state.
D. The method cannot be declared static.
E. The throws clause may include any exceptions defined by your application.
3. Which of the following are requirements for a message-driven bean [choose 4]:
A. It implements the MessageListener and MessageDrivenBean interfaces.
B. It implements one or more ejbCreate methods.
C. It implements one onMessageReceived method.
D. It must not define the finalize method.
E. It implements one ejbRemove method.
F. It must not have a remote or local interface.
4. With CMP, the primary key for an entity bean may be automatically generated by the container if the entity bean meets certain requirements. Which of the following is true [choose 1]?
A. In the deployment descriptor, the primary key class must be defined as a java.lang.Object. The primary key field must not specified.
B. In the home interface, the argument of the findByPrimaryKey method must be a java.lang.Object
C. In the entity bean class, the return type of the ejbCreate method must be a java.lang.Object.
D. All of the above are requirements.
E. None of the above are requirements.
Well done Roger! Some of those questions seem awful familiar from my exam
21 years ago
Hi Bert,
I'm with Sachit on this one, I'd be very interested in taking the new EJB exam and also very interested in your new book. I filled out the survey so I might receive a free voucher for the beta! Will your book be out by beta time?
Judging by the topics on the survey I'm going to need all the help I can get
thanks,
Colin.
21 years ago
Thanks for the advice Jessica
Well I think I'll make a start by buying the SCWCD Exam Kit book. I would hope to be certified before the new version of the exam comes out, but even if I hit a snag hopefully the book will still be useful for the new exam.
Thanks,
Colin.
What a great idea!
I've been doing EJB for 6 months now and would love to work towards this certification! I hope my survey response made it in on time so I get the free voucher
I've gotta say though, those objectives look pretty damn scary....
Kathy, can you tell me if your new book will be out at the same time as the beta exam? After using your great SCJP book you can put my name down for one if it is
Thanks,
Colin.
I'm also very interested in taking SCWCD as soon as possible. I don't want to start studying now, take the exam in (say) June-July, and then have it outdated in August!
Does anyone know what typically happens when Sun updates an exam? Will the new one get a new version number (as in SCJP1.2 -> SCJP1.4)? Or will it be the same cert, just with slightly different content?
Any advice from those in the know would be much appreciated.
Thanks,
Colin.
Thanks all, I'm trying to decide whether to go for SCWCD or SCJD next. I've heard rumours that the SCJD exam might be changing soon, or that Sun's entire certification line might be getting a shake-up (eg a new EJB certification?) Do you think the extra cost and effort associated with the SCJD is worth it? If anyone has any views on this I'd love to hear them.
Thanks,
Colin.
21 years ago
Hi all,
I've just taken and passed SCJP. I've been dropping by JavaRanch all through my study and I'd like to say a big thank you to all the ranch hands, bartenders, greenhorns, cowgirls, and mock exam authors. Your help was invaluable.
I mostly studied for the exam on trains(!) and haven't had much time to post in the forum, but in an effort to redress the balance I have some advice that I hope other people will find useful.
1. The Kathy Sierra and Bert Bates book is outstanding! It covers everything you need to know for the exam and the sample questions are very close to the real thing. It's worth it to go and read the errata page.
2. Well I had finished the KS+BB book and was feeling cocky, so I went and did Dan's mock exams. Oh, dear... I didn't feel so cocky after that Dan's exams are way harder than the real thing but are great for ensuring that you really understand the topics covered on the exam.
3. Do EVERY mock exam you can find. Don't take the answers in all them as gospel but do them to refine and develop your test taking expertise. Which brings me to my main points....
4. Relax and Take your time when taking tests! At the start I was getting poor scores in the mock exams because I was flying through them, worried about the time remaining. You have lots of time. When you see the question:
- Read the intro to the question first
- Scan the answers... be VERY sure that you know EXACTLY what the question is looking for. How many options are to be chosen? Does the question ask for options that are *correct* or *incorrect*? Now look at the answers again. Are you REALLY sure you know what they're asking?
- If there is code read it now. Do a quick sanity check... modifiers OK? keywords OK? curly braces OK? etc. You'll probably have a first guess at the answer now.
- Now read the code/examine the answers AGAIN. Are you sure? Are you really REALLY sure? Can you explain to yourself in your head why the other answers are INCORRECT?
- The more mock test you take, the faster you can do this.. get at them mocks!
5. I think proper test taking technique can give you +15% on your score. What I did was:
- I took a quick scan through the questions. I answered the easy ones (following the above rules!). If I wasn't 100% sure of the answer then I marked it.
- If I hit a question that had complicated code or required some manual calculations, I marked it and skipped past it.
- At the end of about 1 hour I had answered about 50 of the 61 questions. Now I felt really good, no pressure. About 17 questions were marked.
- Now I went and did the complicated questions. I knew I had lots of time now so I used the scratch pad to work them out. Again. I took my time and stepped through the code methodically. When I was happy with my answer I unmarked the question.
- Now I had about 40 mins left and about 5-6 questions that I has answered in the first pass but I was uncertain about. I went back to these and double checked. I found 2 of my original answers were wrong.
- Now I had about 25 mins left and all questions were answered. I took a final pass through all the questions. Nice and slowly... Am I sure? Am I REALLY sure? Well for two questions I discovered something I hadn't seen before (damn sneaky exam writers!) and ended up changing my answer. (Make sure you know why you're changing it... nerves can do funny things. Are you sure? Are you RE.. ah you get it )
- Finally I finished the test with about 3 mins left. I got a mark of 100% but would probably have done much worse if I hadn't approached the exam in the right way.
I hope that this is useful to everybody going for the exam. Please don't follow my advice if you find that it doesn't work for you, but have a plan, relax, take your time, don't panic, (oh yeah, study a little ) and you can do it!
Thanks all, off to lie down now.
Colin.
21 years ago
Eeek, first post! Anyway this is also something I've been thinking about while slogging my way through all the mock exams that I can get my hands on.
For example Dan Chisholm's mock exams (which are great) cover a lot of stuff that's not really addressed in Kathy and Berts book. Static + variable hiding are a good example - the first time I took Dan's "inherit" mock exam I got the fright of my life
Also daemon threads, extra methods of the String/StringBuffer/Wrapper/Thread/Collection classes, having to know if an exception is checked or not (without seeing a hierarchy) etc etc.
I think that a fair portion of this stuff is useful beyond the exam so I'm trying to learn it anyway. Ah more late nights.....