On Thu, Sep 2, 2010 at 3:50 PM, Jarek Gawor <[email protected]> wrote: > > I think we might have two different interpretations of what @DependsOn > annotation really means. For example, > > @Singleton > class A { > �...@postconstruct > initA() { > } > } > > @Singleton @DependsOn("A") > class B { > } > > My understanding of the @DependsOn is that before bean B is > instantiated, the container must ensure that bean A is fully > initialized (the A.initA() post-construct method is called). And since > B can be initialized lazily the container has to enforce the > @DependsOn at runtime. > > Jarek >
Btw, I went ahead and committed the patch. Please feel free to refactor the code if there is a better way of doing things. The patch contained test cases so it should be easy to catch regressions. Thanks, Jarek
