• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejbCertificate mock exam question

 
Leena Diwan
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Identify one correct requirement for an entity bean class?

Correct answer is -
The ejbFind method must have an ejbFind prefix, declared public and must throw FinderException.

I guess we will have to implement and write the code for a finder also with BMP. Nowhere it is mentioned which persistence type to consider, so there is still scope for this answer being right. For a CMP entity bean, should this be marked true or false. The statement is right but the developer does not implement it at all.

Please confirm.

Regards,
Leena
 
Leena Diwan
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more-

The follwoing stmt is marked wrong in one question.

4. Enterprise bean instances obtain the values of the environment entries from the enterprise bean's deployment descriptor.

Reason provided is -
4 is incorrect because the deployment descriptor is used to define only the environment entries, as opposed to the values that the enterprise bean expects to be provided at runtime.

Doesn't this refer to the <env-entry-value> element contents? Isn't this the Deployer's responsibility to run a final check for these values? Sure tools provide a means to give this value at runtime, but does it make the above stmt wrong?

Thanks in Advance,

Regards,
Leena
 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Identify one correct requirement for an entity bean class?

Correct answer is -
The ejbFind method must have an ejbFind prefix, declared public and must throw FinderException.


The question looks ambiguous to me. It did not mention what type the entity bean is. If its a BMP, I agree that ejbFind method must have ejbFind prefix, declared public and throw FinderException.
For CMP, the question does not apply.
 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
4 is incorrect because the deployment descriptor is used to define only the environment entries, as opposed to the values that the enterprise bean expects to be provided at runtime.


That surprises me too. I hope the real exam questions make more sense so we do not have to loose sleep over this.
 
Leena Diwan
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Keerthi P:
I hope the real exam questions make more sense


Fortunately, they do!

Thanks for the reply.

Regards,
Leena
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess we will have to implement and write the code for a finder also with BMP.

EJB 2.1 version and after, there is no BMP Entity Bean. There is only CMP.

Thanks

-- Ravi
 
Leena Diwan
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ravi.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic