Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BMP Entity beans

 
Walter Vetrivel
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following are true regarding BMP Entity beans?





a) Persistent fields can be declared private.

b) The ejbFindByPrimaryKey() method returns void.

c) Finder methods are implemented at deployment time.

d) A record should be inserted into the database during ejbCreate().


Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
 
Amanda Waite
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a) Persistent fields can be declared private.
This is correct. In CMP persistent fields must be declared ppublic as the container directly accesses the fields when reading and writing values. I don't know of any advantages other than encapsulation for making these fields private
b) The ejbFindByPrimaryKey() method returns void.
This isn't correct. The ejbFindByPrimaryKey() method's return value is the primary key.
c) Finder methods are implemented at deployment time.
This is incorrect, but is true for CMP
d) A record should be inserted into the database during ejbCreate().
This is correct
 
Walter Vetrivel
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I arrived at the same answers by ruling out the wrong options
but I was wondering about how the answer "the private fields for bmp entity bean" could be right, ur reply cleared my doubt thanks,
Walter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic