Luigi Rubino

+ Follow
since Feb 26, 2004
Luigi likes ...
Oracle Spring Java
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Luigi Rubino

Hi everyone,

today I passed my JPA Certification exam!

There isnt't a book that prepares you specifically to this certification, but I used the resources suggested in this forum (thanks to all of you that shared your resources!):

- Pro JPA 2, 2009 edition:
There is a newer edition, but if you want to be more focused on the stuff that is tested on the exam, you can use the old version too, it's up to you.

- JPA 2.0 scecification:
Don't be scared by the fact that is a specification, it is not so hard to read, and I think it's a must. In fact, I think that studying on Pro JPA 2 alone isn't enough.

- Enthuware test prep:
Really useful, because it really goes into details about why some answers are correct or not, referring to the specifications.
Some question are very similar to the ones found in the real exam (maybe too similar).

I used MyExamCloud too, but I wouldn't suggest it, Enthuware product is much much better.

I think that preparing for this exam really helped me in improving my preparation on JPA.

I passed the exam, studying on Jeanne Boyarsky & Scott Selikoff's book (and the Java 8 api docs, of course).
Thanks for your great book, and thanks to everyone participating in this forum.
Question 10 in chapter 6 asks:

10. Which of the following are true of the code? (Choose all that apply.)

   4:    private int addPlusOne(int a, int b) {
   5:       boolean assert = false;
   6:       assert a++ > 0;
   7:       assert b > 0;
   8:       return a + b;
   9:    }

A. Line 5 does not compile.
B. Lines 6 and 7 do not compile because they are missing the String message.
C. Lines 6 and 7 do not compile because they are missing parentheses.
D. Line 6 is an appropriate use of an assertion.
E. Line 7 is an appropriate use of an assertion.

In the answers is stated that E is correct because checking with assert an argument passed from elsewhere in the program is a good use of assertions.

But in the book is explicitly stated that, when checking method parameters, we should not use asserts, but we should throw IllegalArgumentException instead  (and I agree with that).

Why is there this discrepancy? Maybe it is because for the exam we should answer "Yes, it is appropriate", but in real life we should answer "No, throwing IllegalArgumentException is appropriate instead" ?
Yes Stephan, I had the same doubt before posting. But I think that the question could also be interpreted this way:
 "Which of the following prints OhNo with the assertion failure when (every time and only when) the number is not negative?"

So I suggested, for more clarity, to use "not negative".
Given the question #9 in chapter 6:

 9. Which of the following prints OhNo with the assertion failure when the number is negative? (Choose all that apply.)

   1. assert n < 0: "OhNo";
   2. assert n < 0, "OhNo";
   3. assert n < 0 ("OhNo");
   4. assert(n < 0): "OhNo";
   5. assert(n < 0, "OhNo");

I found that there is an errata:
 319 Chapter 6 Mock question #9 – “when the number is negative” should be “when the number is positive” in the question Inverted question T Vergilio 2016-01-31 Pending

I think that the question should be:

9. Which of the following prints OhNo with the assertion failure when the number is not negative? (Choose all that apply.)
In chapter 5 there is the following code, in the "Parsing" paragraph:

Running the code I get a ParseException (I live in Italy, so I get a different default NumberFormat than who lives in the US).
I think that the second line should be rewritten as:

Hi everyone,

I am studying the book on safaribooksonline and I find it a great study tool, but I am having troubles keeping track of the errors.
In fact, using the online version of the book, I cannot correct the errors that have been found until now as I would do with a written book, using a pencil.
Would it be possible to correct the errors in the online version of the book, too?

It would be nice to have the exam questions on site corrected too.


Originally posted by Arun Ramakrishnan:
I have cleared the SCEA - PART1 with 93%. I have been a silent follower of the topics in this forum. This forum has been of great help to me in terms of the resources for SCEA.

Congratulations ! Have a cold beer now

Originally posted by Arun Kumar Ilangovan:
I have been preparing for SCEA Part 1 for the past 3 months. Last week i took some mock questions available in the net. I got 65% as an average mark in each and every topic. Can i appear in the real exam.

I think you can take the exam. I think mock questions are usually ambiguous, sometimes have wrong answers, and usually don't give you the number of correct answers.

Good luck!

Originally posted by veena madhukar:
Congratulations. Do you know the results as soon as you finish the exam? DO you get to see all the questions to begin with itself?

Yes, you know the results (only the section scores and the overall percentage) as soon as you finish the exam.
If you click next on each question, after the last question it appears a new button, item review; using it, you can choose the question you want to answer.

I've just cleared Part I (score:89%):

Concepts ------------------- 100%
Common Architectures-------- 66%
Legacy Conectivity---------- 80%
EJB------------------------- 88%
EJB Container Model--------- 100%
Protocols------------------- 100%
Applicability of J2EE------- 66%
Design Patterns------------- 100%
Messaging------------------- 100%
I18N------------------------ 100%
Security-------------------- 100%

Longest questions were generally at beginning, shorter (and usually easyer) were at the end. I found it useful to begin with the latest questions first.

Thanks for every one in this group. I really appreciate everyone's contribution.

Part II here I come!
[ March 10, 2006: Message edited by: Luigi Rubino ]
Thanks to all.
I'm new to Hibernate, and I like it very much.
I think that the solution using an entity class is the most intuitive, and permits to manage all the attributes of the entity class.

Special thanks to Gavin for this great persistence framework.

Best regards,
Really don't know how to use it!
Documentation refers to some kind of Enumtype:
..."Available contract types are silver, gold and premium and they are instance of the Enumtype called ContractType"...

but what if I need to create the list of choices on the fly? What Class do they need to be?

18 years ago