| Author |
callback and lifecycle methods
|
Sainudheen Mydeen
Ranch Hand
Joined: Aug 18, 2003
Posts: 218
|
|
Hi Are callback and lifecycle methods of EJB different? -Sainudheen
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
|
I would say YES.
|
Groovy
|
 |
Sainudheen Mydeen
Ranch Hand
Joined: Aug 18, 2003
Posts: 218
|
|
Can somebody explain or show me a link where I can get more details about the differences? Thanks -Sainudheen
|
 |
Sivasundaram Umapathy
Ranch Hand
Joined: Aug 10, 2002
Posts: 360
|
|
|
Lifecycle methods generally use the callback mechanism to pass control and data to the bean.
|
Siva
Co-Author - SCMAD Exam Guide - ISBN:9780070077881
Author - Java certification success, Part 4: SCEA
|
 |
Sainudheen Mydeen
Ranch Hand
Joined: Aug 18, 2003
Posts: 218
|
|
Hi I read ejbActivate, ejbPassivate, setEntityContext etc are known as callback methods. Are they not life-cycle methods? OR they are so called based on the context? -Sainudheen
|
 |
Kathy Sierra
Cowgirl and Author
Ranch Hand
Joined: Oct 10, 2002
Posts: 1572
|
|
Lifecycle methods are indeed Container callbacks. Basically, anything that's not a business method from the component interface is considered a Container callback. That means anything with "ejb" in front of the name. But you won't need to care about this distinction in terminology for the exam. As long as you know the circumstances under which methods are called on the bean class, you will be fine. The key things are to understand the differences between the behavior of lifecycle methods such as ejbCreate() and ejbRemove() on all of the different bean types. Or things like... which ones are invoked as a direct result of a client invocation. For example, ejbRemove() is called on a stateFUL session bean or entity bean as a direct result of a client call to remove(), but on a stateLESS session bean, the ejbRemove() Container callback is NOT called as a result of a client invocation (but rather because the Container just decided it was time to start killing some beans to shrink the pool size... and when the client calls remove() on a stateLESS bean, the Container just laughs and says, "Do you think I CARE?" cheers, kathy
|
 |
somkiat puisungnoen
Ranch Hand
Joined: Jul 04, 2003
Posts: 1312
|
|
It cleared.
Lifecycle methods are indeed Container callbacks
|
SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
|
 |
 |
|
|
subject: callback and lifecycle methods
|
|
|