• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Entity Bean...Default Constructor....

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

GM. Below is a question/detailed answer from ejbcertificate.com. My confusion is on answer #1. Why is #1 right? Is it not true that the compiler will provide the default constructor(in the absense of Bean Provider not providing the same) and why the Bean provider "must" provide the same? I looked at the example code given in HFEJB and that too does not provide a constructor. Please suggest...

Thanks...

=========================================================================
Which of the following methods must the entity bean provider implement in the abstract entity bean class?

Incorrect, you chose answer 4. The correct answers are 1,4.

1) The entity bean provider must provide a public constructor without arguments.
2) The entity bean provider must provide at least one implementation for the ejbCreate() method. 3) The entity bean provider must provide the implementation of the ejbFind() method(s). 4) The entity bean provider must provide the implementation of the ejbHome() method(s). 5) The entity bean provider must provide at least one ejbSelect() method.

Answers 1 and 4 are correct.

Answer 2 is incorrect, there are zero or more ejbCreate() methods, whose signatures match the signatures of the create() methods of the entity bean's home interface.

Answer 3 is incorrect, the bean provider of an entity bean with container-managed persistence does not write the finder methods. The finder methods are generated at the entity bean deployment time using the Container Provider's tools.

Answer 5 is incorrect, the Bean Provider may provide zero or more select methods. A select method is a query method that is not directly exposed to the client in the home or component interface. The bean provider typically calls a select method within a business method. The bean provider defines the select methods as abstract methods.
=========================================================================
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vijay,

I also agree that the first option is confusing; To avoid confusion, I read it this way "Bean Provider must not provide any constructors with arguments so that the compiler will give the default no-arg constructor or the bean provider himself can do that". And I'm pretty sure that the real exam does not give ambiguous questions like this

Bharathi
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic