Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

p.363-mock exam q.5

 
Amit Batra
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
p363,Q5 the correct option is shown as choice B. reason on p368 as: "it(the ejbcreate()) can't be -static,void,final, must return the type of primary key."
My question is whats wrong with option D?. its return type is int, yes, but why cant that ever be the primary key return type?
 
M Mistroni
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
i htink primaryKey cant be a primitive

hth
marco
 
Amit Batra
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marco,
thanks for your response. Have you read this somewhere Or are you making a guess? because I havent been able to find anything in the book or online to confirm this.
 
Rajan Murugan
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Refer to the spec.In the dd you need to mention the primary key class and primary key field.Further,it mentions the primary key type need to have hashCode and equals.

The Bean Provider must specify a primary key class in the deployment descriptor.The primary key type must be a legal Value Type in RMI-IIOP.
The class must provide suitable implementation of the hashCode() and equals(Object other) methods to simplify the management of the primary keys by client code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic