title: What is the difference between @Inject and @PersistenceContext?
body: <p>In a project using JPA, I commonly use</p>
  
  <pre><code>@Inject EntityManager em;
  </code></pre>
  
  <p>in order to obtain such an object. I saw that many code snippets in the web instead use:</p>
  
  <pre><code>@PersistenceContext EntityManager em;
  </code></pre>
  
  <p>What is the difference between these options?</p>
  
  <p>My code runs on JBoss EAP 6.1 and Hibernate.</p>