• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

needs clerification from chapter 6 Entity Bean Synchronization

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to all,
I am new member of this group and preparing for SCBCD exam.I came across some problem while reading chapter 6 from our own book Head First EJB.
Questions are:
Q.9 Which method(s) from the EntityContext interface can be invoked from within the ejbCreate method?
A. getEJBHome()
B. getEJBObject()
C. getCallerPrincipal()
D. getUserTransaction();
E. setRollbackOnly();
Answers given: A, B, C, E
Correct answers should be: A, C, E
From My point of view B can not be correct as EJBObject can not used because when client call create method on EJBHome there is no EJBObject reference for it.

Question no. 13
What is true about an CMP entity bean�s primary key?
A.The bean�s primary key class must provide a suitable implementation of the hashCode and equals methods.
B.When specifying the primary key in the deployment descriptor,only the field name must be declared
C.All fields in the primary key class must be declared public.
D.All fields used in the primary key must be container-managed field.
Answers given: A, C, D
Correct answers should be: A, D
C can not be correct from my point of view as fields in the primary class should be marked as private and primary class should have public accessor methods for persistence fields.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jain,
Welcome to our Community!

First Question: 9
Your answer is absolutely right! The answer should be: A, C, E. you can free to refer the 10.5.4 The EntityContext interface topic from ejb-2_0-final release Specification.

Second Question: 13
Your answer is absolutely wrong! The HF given answer is right: A, C, D. still you can free to refer 10.8 Primary key and 10.8.2 Primary key that maps to multiple fields in the entity bean class topics from ejb-2_0-final release Specification.

D Prabhagar
SCJP5(73%), SCWCD(89%), SCBCD(In Progress...)
 
ShantiPrakash Jain
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Prabhagar...
your answers are right...
 
Sometimes you feel like a nut. Sometimes you feel like a tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic