• 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
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Doubt on entity bean question

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Problem

Which of the following methods must be implemented by an entity bean class with Container managed persistence?

Options

Select 1 correct option.

a.At least one ejbCreate(...)


b.ejbFindByPrimaryKey(...)


c.At least one ejbSelect(...)


d.At least one ejbFindByXXX(...) (other than ejbFindByPrimaryey(...))


f.None of these.

Answers is f.

But I think the answer is B.
Please help me!
Regards,
Prathibha
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

The answer if (f) because for CMP beans you don't implement the ejbFinder methods in your bean class, the container does that for you.

Surya Baabu
 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because of the primary key is defined in a standard XML deployment descriptor file ,the container knows how to provide the ejbFindByPrimaryKey() finder method and generates the appropriate JDBC SELECT statement to support it. Therefore, You don't implement this method.
 
Prathibha Bharathi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank U Surya and Leenapongpanit! My doubt is now clarified.

Regards,
Prathibha
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic