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

Mock Question

 
rahul V kumar
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following statements are correct about the responsibilities of the EJB container? [Check all correct answers]
The correct answer is:
1. When the container invokes the ejbRemove() method the container removes immediately the entity from the database.
2. After the ejbHome() method completes, the instance remains in the ready state.
3. The container synchronizes the instance's state before it invokes the ejbRemove() method and uses the ejbLoad() method.
4. The container is responsible for providing the implementation of the ejbFind() methods.
5. The container is responsible for calling the ejbCreate() method.
Mock answers - 3,4 and 5
How is option 4 correct? For a BMP can't we provide the implementation.
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this is a mock exam related to SCBCD exam, I would say option 4 is correct,
as BMP is out of scope. The exam would not contain any questions to related BMP.
It covers only CMP2.0 and the Container is responsible to provide the implementation
for the ejbFind methods and not the bean provider.
By the way, why is option 1 incorrect?
Is it because, the client calls remove() method, Container calls ejbRemove() method.
It waits for the execution of the ejbRemove() method to finish, and then
deletes the row in the database.
So the word "immediately" may not be the perfect word to be used here.
Any comments?
 
rahul V kumar
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vish Kumar:
If this is a mock exam related to SCBCD exam, I would say option 4 is correct,
as BMP is out of scope. The exam would not contain any questions to related BMP.
It covers only CMP2.0 and the Container is responsible to provide the implementation
for the ejbFind methods and not the bean provider.
By the way, why is option 1 incorrect?
Is it because, the client calls remove() method, Container calls ejbRemove() method.
It waits for the execution of the ejbRemove() method to finish, and then
deletes the row in the database.
So the word "immediately" may not be the perfect word to be used here.
Any comments?

Yes this question is from a mock exam. But can we expect these kind of questions on the real exam ??
When the client calls ejbRemove() method, the container synchronizes the instance�s state before it invokes the ejbRemove method i.e. ejbLoad() is called so that state of the instance at the beginning of the ejbRemove method is the same as it would be at the beginning of a business method.
Refer to page 172 of Spec.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic