Hi,
i got a question over an Entity
EJB (BMP or CMP as they life-cicle is pretty much the same) life-cicle.
I've search over some books and there's a step that all of them seem to miss (or just don't be to explicit).
There are 3 stages for an entity EJB.
- no state
- pool
- ready
The transition i'd like some help is the pool -> ready transition.
When i use ejbCreate() is pretty simple, that's not the case.
Then, there're only left one more way, through the ejbActivate() -> ejbLoad() methods.
Here's my point...
All the books i read describe the ejbFind() methods being on the pool stage (an arrow coming from it and going to it). This is exactly where i disagree!
Suppose i have a CMPon pool rigth now and i also have a SessionBean holding a reference to that CMPLocalHome interface. Note that at this point, the CMP is still on pool.
Then, from my client, i call a method on SessionBean that does something like the following.
As u can see, i just obtained a Local interface from the LocalHome interface i had before.
After that, i called a getter method of the CMP bean, by that its pretty obvious that my CMP bean has got to be transitioned to the ready state, as it was associated with database data.
Here goes my question,
When exactly did the container called ejbActivate() -> ejbLoad()??? In other words, how exactly did my CMP bean get to the ready stage?
Thank you so much,
ltcmelo