Note that the point here is the use of the extended persistence context injection on a regular managed bean, not an EJB.<div><div><br></div><div>-Dan</div><div><br></div><div>p.s. This lends itself well to an Arquillian test for demonstrating the current and desired exceptions.<br>

<br><div class="gmail_quote">On Tue, Apr 17, 2012 at 18:37, Jason Porter <span dir="ltr">&lt;<a href="mailto:lightguard.jp@gmail.com">lightguard.jp@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I don&#39;t know where this should fail, but it needs to fail somewhere, and if CDI isn&#39;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&#39;re the &quot;experts&quot;.<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&#39;t valid (the @PersistenceContext injection).</div><span class="HOEnZb"><font color="#888888"><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>
</font></span><br>_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Dan Allen</div>Principal Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><br><div><a href="http://google.com/profiles/dan.j.allen" target="_blank">http://google.com/profiles/dan.j.allen</a><br>

<a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br></div><br>
</div></div>