• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFEJB Page363 Question5 and Page428 Question12

 
Steven Gao Song
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone,

I think that the answers to Question5 on Page363 and
Question12 Page428 provided by the authors have some problem.

The answer to Q5 should be B and D, not only B.

The answer to Q12 should be B, not B and D.

What do you think? Thanks.
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Steven,

Q5: D is not correct, because ejbCreate() should return prim.key type
(page 333, 4th bullet)

Q12: why do you think D is false? Compare it to the EJB-QL on page 402.

Herman
 
Steven Gao Song
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Herman,

Q5:
(D) public int ejbCreate() throws javax.ejb.CreateException
The prim.key type is int. So, correct.

Q12:

(D) SELECT OBJECT(o) FROM Order o
It means all the Order. However, the question says "which will return all orders that have line items?". So, I think (D) is wrong.
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q5: int is not a valid prim.key type (Integer would be OK).
HFEJB is not clear about this on page 333, but prim. key has to be a class (not a primitive).

Q12: read very carefully. Will the query return all orders that have line-items? The answer is yes.
It will also return orders without line-items, but that was not the question.

Don't worry about the second one, I don't recall there were funny questions like this one the exam.

Herman
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic