title: How are singletons handled in a web application?
body: <p>From what I understand, a singleton is basically when you have a private member that represents the object you want to have a single instance for.  Then in the constructor you initialize the member object.</p>
  
  <p>All references for this object are done via a public property, and the public property just references the private member that has already been instantiated.</p>
  
  <p>Now in a web application, how does this work?  Does a single instance just hang around in the container (say tomcat) until tomcat is shutdown?</p>