title: EntityManager and two DAO with PersistenceContextType.EXTENDED
body: <p>I have a problem with my entity manager in my application. I have two DAO clasess like this:</p>
  
  <pre><code>@Repository
  public abstract class DaoA 
  {
      protected ClassA persistentClass;
  
      @PersistenceContext(name="my.persistence", type=PersistenceContextType.EXTENDED)
      protected EntityManager entityManager;
      -------------- some typical action for DAO --------------
  }
  </code></pre>
  
  <p>Second DAO is for ClassB and looks similar to DaoA. The rest of things are done for me by the Spring framework. </p>
  
  <p>When I'm debugging the application I recognize that both DAO objects have different instances of EntityManager. In the result my two different DAOs are connected with different PersistenceContext. </p>
  
  <p>Question is if this is correct behaviour or not? I would like to have the same PersistenceContext for all my DAO classes. Please give me a hint if this is possible and if I understood the JPA correctly?</p>
  
  <p>Regards Hsd</p>