title: Obtaining EntityManager without Spring
body: <p>I'm using hibernate but not Spring, and just found <a href="http://code.google.com/p/hibernate-generic-dao/" rel="nofollow">hibernate-generic-dao</a>.
  The concept seems nice, but when I run it I get a NPE because I haven't called setEntityManager().</p>
  
  <p>How do I obtain an EntityManager without using Spring?</p>