title: Spring: Bean init method is not called and its properties does not take values
body: <p>I have two similar beans. They are set to be called in a <code>ScheduledTimerTask</code>.</p>
  
  <p>But one is working fine, the other is not! Here are these two configurations:</p>
  
  <pre><code>&lt;!--  Clear Orders By Sessions --&gt;
  &lt;bean id="clearExpiredSessionOrdersTask" class="com.datx.timers.ClearExpiredSessionOrdersTask" autowire="byName"&gt;
      &lt;property name="period" value="00:02:10"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="clearExpiredSessionOrdersTaskInvoker"
      class="org.springframework.scheduling.timer.MethodInvokingTimerTaskFactoryBean"&gt;
      &lt;property name="targetObject" ref="clearExpiredSessionOrdersTask" /&gt;
      &lt;property name="targetMethod" value="doTask" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="clearExpiredSessionOrdersTaskTimer" class="org.springframework.scheduling.timer.ScheduledTimerTask"&gt;
      &lt;property name="timerTask" ref="clearExpiredSessionOrdersTaskInvoker" /&gt;
      &lt;property name="delay" value="1000" /&gt;&lt;!-- In miliseconds --&gt;
      &lt;property name="period" value="130000" /&gt;&lt;!-- In miliseconds --&gt;
  &lt;/bean&gt;
  &lt;!--  Clear Orders By Sessions --&gt;
  </code></pre>
  
  <p>This is the one which is working. My class is <code>com.datx.timers.ClearExpiredSessionOrdersTask</code> in the first line.</p>
  
  <p>The other bean is set like this:</p>
  
  <pre><code>&lt;!-- DocumentScheduleTask --&gt;
  
  &lt;bean id="documentSchaduleTask" class="com.datx.timers.DocumentSchaduleTask" autowire="byName" init-method="init"&gt;
       &lt;property name="period" value="00:02:10"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="documentSchaduleTaskInvoker"
      class="org.springframework.scheduling.timer.MethodInvokingTimerTaskFactoryBean"&gt;
      &lt;property name="targetObject" ref ="documentSchaduleTask" /&gt;
      &lt;property name="targetMethod" value="doTask" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="documentSchaduleTaskTimer" class="org.springframework.scheduling.timer.ScheduledTimerTask"&gt;
      &lt;property name="timerTask" ref="documentSchaduleTaskInvoker" /&gt;
      &lt;property name="delay" value="1000" /&gt;&lt;!-- In miliseconds --&gt;
      &lt;property name="period" value="130000" /&gt;&lt;!-- In miliseconds --&gt;
  &lt;/bean&gt;
  
  
  &lt;!-- DocumentScheduleTask --&gt;
  </code></pre>
  
  <p>Do you see the similarities? Again the first line is my class.</p>
  
  <p>An this is my <code>DocumentScheduleTask</code> class:</p>
  
  <pre><code>public class DocumentSchaduleTask{
      private String period;
      public init(){
         System.out.println("Test");
      }
      public void doTask(){
          //This method is called at a specific time
      }
  
      public void setPeriod(String period){
          this.period = period;
      }
      public String getPeriod(){
          return this.period;
      }
  }
  </code></pre>
  
  <p>The rest of these configurations are the same. But in the second one the <code>period</code> property does no take value. And its <code>init</code> method is not called. What are these implying?</p>
  
  <p>Why would have caused this? Where should I look for? Do you see any differences at all?</p>