• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Byron's SCEA Preparation Exam: Question #1

 
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am currently preparing for the SCEA. In order to prepare myself and help others, I will periodically post questions for discussion.
I will post the question and the answer with an explanation separately.
I�d like to get feedback on the correctness of my answer/explanation and constructive criticism to make the question better.
I�ll take your feedback and update the question/answer and aggregate them into an exam, which I will later share with the group.
Byron Estes

Question #1
Changing the �session-type� bean setting in the deployment descriptor can change a session bean from stateful to stateless. What else may need to be changed for a stateful session bean to become a valid stateless session bean?
a)ejbPostCreate methods
b)ejbCreate methods
c)ejbRemove method
d)ejbActivate method
e)ejbPassivate method
 
Byron Estes
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The DRAFT answer with explanation...

The answer is �B�. If the stateful session bean has ejbCreate methods other than the default/empty ejbCreate() method, those methods would need to be removed. If the stateful session bean did not have a default/empty ejbCreate() method, then one would need to be added.
Answer �A� is incorrect because ejbPostCreate() is a callback method for entity beans, not session beans.
Answer �C� is incorrect because ejbRemove() can remain unchanged for a stateful or stateless session bean. It is immaterial.
Answer �D� is incorrect. While ejbActivate() is only pertinent to a stateful session bean (i.e. which needs to preserve conversational state), leaving the method in the bean class will not result in any validation errors.
Answer �E� is incorrect. While ejbPassivate() is only pertinent to a stateful session bean (i.e. which needs to preserve conversational state), leaving the method in the bean class will not result in any validation errors.
 
reply
    Bookmark Topic Watch Topic
  • New Topic