• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

methods to be implemented by Entity Bean with CMP

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which of the following methods must be implemented by an entity bean class with Container managed persistence?

Select 1 correct option.
A. At least one ejbCreate(...)
B. ejbFindByPrimaryKey(...)
C. At least one ejbSelect(...)
D. At least one ejbFindByXXX(...) (other than ejbFindByPrimaryey(...))
E. None of these.

I selected the option B. The spec also says the same thing on page 271. = "Every entity bean must define the ejbFindByPrimaryKey method."

The test exam says the correct option is E.

Any takers?
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
B is wrong. The findByPrimaryKey method is implemented by the application server, not the bean programmer.
You do need to define it in the home interface(s) though to return the correct type and take the correct type parameter.

ejbCreate is required only for sessionbeans.

the others are never required.

So e) is indeed the only correct answer.
 
Rajesh Chande
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I can say that option B would have been correct in case of a Entity Bean with BMP.

right?
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes option B would have been correct if it were an entity bean with BMP.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic