[cdi-dev] Needed failing for JPA / EJB

Lincoln Baxter, III lbaxter at redhat.com
Wed Apr 18 00:09:27 EDT 2012


Maybe I'm missing something, but why should this fail?

~Lincoln

On Tue 17 Apr 2012 06:37:33 PM EDT, Jason Porter wrote:
> 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".
>
> public class EmProducer() {
>     @PersistenceContext(type = PersistenceContextType.EXTENDED)
>     EntityManager em;
>
>     @Produces @RequestScoped
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
>
> That should be a deployment exception stating it isn't valid (the
> @PersistenceContext injection).
>
> --
> Jason Porter
> http://lightguard-jp.blogspot.com
> http://twitter.com/lightguardjp
>
> Software Engineer
> Open Source Advocate
> Author of Seam Catch - Next Generation Java Exception Handling
>
> PGP key id: 926CCFF5
> PGP key available at: keyserver.net <http://keyserver.net>,
> pgp.mit.edu <http://pgp.mit.edu>
>
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev

--
---
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."



More information about the cdi-dev mailing list