title: Does annotating a bean @DependsOn mean the dependent bean will be instantiated or initialized?
body: <p>I am using Spring 3.0.2. I have two relatively simple bean definitions. One has a @PostConstruct (bean 'A') which triggers a chain of events that the @DependsOn bean (bean 'B') needs to be prepared for. However, it seems even though that I stated that the bean 'A' is dependent on bean 'B', the events (the lifecycle methods) of bean 'A' are running before bean 'B' is fully initialized.</p>
  
  <p>Does stating that a bean is "dependent" via @DependsOn (or for that matter, depends-on in a bean definition) mean that the dependent bean's lifecycle methods will be completed before the   bean that is dependent on said bean?</p>
  
  <p>Will bean 'B' lifecycle methods be completed before bean 'A'?</p>
  
  <p><strong>UPDATE</strong> </p>
  
  <p>Bean A is a custom class that is using a JMS Template to send a message announcing that he has initialized.</p>
  
  <p>The recipient of said message processes it and forwards it's configuration to a MessageListeningContainer (Bean B). </p>
  
  <p>The first part is happening all before Bean B has been started by the DefaultLifecycleProcessor.</p>
  
  <pre><code>@Component
  @DependsOn("beanB")
  public class BeanA {
      @PostConstruct
      public void init() {
          // do stuff
      }
  }
  
  &lt;bean id="beanB" class="org.springframework.jms.listener.DefaultMessageListenerContainr"&gt;
      &lt;!-- other configuration --&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I added in my init method the injection of bean b plus two logging statements:</p>
  
  <pre><code>container.isRunning();
  container.isActive();
  </code></pre>
  
  <p>I looked at the spring source and isActive is set to true after the Initialization method (doInitialized is completed). The isRunning is set after the doStart is completed. The doStart is triggered by the DefaultLifecycleProcessor which is occurring after the @PostConstruct annotated methods are called. </p>
  
  <p>How can I guarantee that my Postconstruct method is called AFTER bean b has been initialized AND started?</p>