I don't know where this should fail, but it needs to fail somewhere, and if CDI isn't it, I trust there are people on this list the other EGs will listen to because too many of them ignore the users list, because you know, they're the "experts".<div>
<br></div><div>public class EmProducer() {</div><div> @PersistenceContext(type = PersistenceContextType.EXTENDED)</div><div> EntityManager em;</div><div><br></div><div> @Produces @RequestScoped</div><div> public EntityManager getEntityManager() {</div>
<div> return em;</div><div> }</div><div>}</div><div><br></div><div>That should be a deployment exception stating it isn't valid (the @PersistenceContext injection).</div><div><div><br></div>-- <br>Jason Porter<br>
<a href="http://lightguard-jp.blogspot.com" target="_blank">http://lightguard-jp.blogspot.com</a><br><a href="http://twitter.com/lightguardjp" target="_blank">http://twitter.com/lightguardjp</a><br><br>Software Engineer<br>
Open Source Advocate<br>Author of Seam Catch - Next Generation Java Exception Handling<br><br>PGP key id: 926CCFF5<br>PGP key available at: <a href="http://keyserver.net" target="_blank">keyserver.net</a>, <a href="http://pgp.mit.edu" target="_blank">pgp.mit.edu</a><br>
</div>