• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

entity bean question

 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In what manner is a reference to an Entity Bean obtained by a client?

A. Invoking the zero-argument public constructor of the bean.

B. Invoking the appropriate create() method of the home interface.

C. Invoking the newInstance() method of the home interface.

D. Invoking the newInstance() method
Which of the following MUST be declared for a CMP Entity Bean in its deployment descriptor?

A. Bean class.

B. Database connection factory reference.

C. Home and remote interfaces.

D. Primary key class.
E. Dataresource
[ February 26, 2003: Message edited by: Timber Lee ]
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ans is B
 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what instance will create if creat() in home is executed?
Dataresource should be described in deployment descriptor for CMP Entity Bean ?
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Timber,
The answer to your first question is B, that is, by calling the create() method from the home interface. A is false because you cannot access the bean directly from the client.
The answer to your second questions I think its A and C only. Even though you can also specify references to connection resources and primary key, this is not necessary. Option D may seem a required parameter, but the EJB spec allows you to defer the definition of a CMP primary key until deployment time (section 10.8.3 of the EJB2.0 specs). This is not possible, though, for BMPs.
Eduard
 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank Eduard Manas for your explanation to me in detail
 
You showed up just in time for the waffles! And this 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