![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirTexpl7Q48sPVIs4zBLhX-Ts4NqZscySCqLiW5_CeHYH4b0_ymLdWdPT2WLGS6DL2l0qeG4PI-aAACP-B8pfCCtRFb7IKJrGpTx2I9rk8TyGWiH0fHfsnGEiCu1d3vb1WUp8FtfCVmko/s320/MCBean.png)
While working on EJBTHREE-1889 I stumbled right into an assumption boobytrap. In my mind I figured that a MicroContainer bean would have a state diagram as shown on the left side. In reality MC bean instances can be 'destroyed' and then 'created', because for MC it's just a state change with no additional semantics.
"Specifically the beans named in the @Depends or
values will reach their CREATE states before the bean declaring the dependencies reaches its CREATE state. The same is true for the START, STOP and DESTROY states." [MC 12.3]
So MC is voodoo magic, it will resurrect your bean. :-)
No comments:
Post a Comment