• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • 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
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic