title: Invalidating JPA EntityManager session
body: <p>A project I am working on uses Spring 2.5 &amp; JPA with Hibernate as a provider. </p>
  
  <p>My DAO classes extend JpaDaoSupport, so I get my JpaTemplate using the getJpaTemplate() method.</p>
  
  <p>The back-end database can get changed either by my application, or a third-party application. </p>
  
  <p>When a third-party application changes the database (mostly configuration data changes), I need to provide the user of my application a way to invalidate all JPA sessions and reload the new data (i.e. invalidate all the hibernate sessions in the background). This needs to be "seen" by all concurrent users of my application.</p>
  
  <p>How can I do this?</p>