title: @SessionAttribute not being set
body: <p>I really need your help. I'm using my portlet app as usual when suddenly I have to get out of computer. When I return, there's NullPointerException. OK, why's that? Hmm... my session doesn't contain object it should hold. So, I'm probably loosing something but here's how I always looked at SessionAttributes.</p>
  
  <p>I have my Controller annotated as so:</p>
  
  <pre><code>@SessionAttributes({
      SOME_ATTR
  })
  </code></pre>
  
  <p>Then I have a method with following signature:</p>
  
  <pre><code>@Valid @ModelAttribute(SOME_ATTR) SomeObject someObject
  </code></pre>
  
  <p>And also init method for my session attribute:</p>
  
  <pre><code>@ModelAttribute(SOME_ATTR)
  public SomeObject getSomeEmptyObject() {
      return someUtils.createSomeObject();
  }
  </code></pre>
  
  <p>When I debugged my app at this point I found out that:</p>
  
  <ul>
  <li>manually looking into the session, there's nothing in it</li>
  <li>form is properly binded to <code>someObject</code></li>
  </ul>
  
  <p>So my two big questions are:</p>
  
  <ul>
  <li>why doesn't Spring set <code>someObject</code> into session as well?</li>
  <li>when the session was invalidated, why wasn't <code>getSomeEmptyObject()</code> called to fill the empty space?</li>
  </ul>
  
  <p>Thanks in forward!</p>