title: Where does session data belong in Wicket?
body: <p>Since Wicket automatically manages session state by serializing the components in my page, I'm left wondering, at which level I should attach my state data. More specifically, it seems like a bug I'm having is caused by the <code>WebApplication</code> object being shared among sessions.</p>
  
  <ul>
  <li>Is the application instance shared between sessions?</li>
  <li>Should I always attach session data to the <code>Page</code> instance?</li>
  <li>What happens if I reuse components with attached session state on multiple pages? Are those instances shared, i.e. if I set the state on the component on one page, is it carried over to another?</li>
  </ul>
  
  <p>I'm guessing, the third bullet point depends on object identity. What does Wicket use to determine that, <code>equals()</code> (like, is it using a <code>Map</code>)?</p>
  
  <p>The data I attached to the application object is state I would need in many pages, so I didn't attach it to the page objects. Is that the correct way to do it in Wicket?</p>