title: Sharing a persistence unit across components in a .ear file
body: <p>In a Java EE 6 application where I'm using .ear packaging, I'd like to create a persistence unit that can be accessed from components in different .jar files.</p>
  
  <p>However, I'm not sure how to define this persistence unit. With the @PersistenceContext annotation the lookup only succeeds if the name matches a persistence unit defined in the local persistence.xml file.</p>
  
  <p>Is it possible to refer to external persistence units?</p>