• 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 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
reply
    Bookmark Topic Watch Topic
  • New Topic