You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Mark Struberg <st...@yahoo.de> on 2009/03/25 14:48:59 UTC
obtaining the JtaEntityManager
Hi!
I currently code the integration of OpenEJB into OpenWebBeans and need your help.
The JSR-299 spec requires us to inject @PersistenceContext and @PersistenceUnit into contextual beans. If we are running with OpenEJB, I like to inject the JtaEntityManager OpenEJB provides. So my question is:
How can I obtain the JtaEntityManager?
Is there an easy way to get it from OpenEJB or hand over the control to let OpenEJB inject it into our beans field?
txs in advance and LieGrue,
strub
Re: obtaining the JtaEntityManager
Posted by David Blevins <da...@visi.com>.
On Mar 25, 2009, at 6:48 AM, Mark Struberg wrote:
> I currently code the integration of OpenEJB into OpenWebBeans and
> need your help.
>
> The JSR-299 spec requires us to inject @PersistenceContext and
> @PersistenceUnit into contextual beans. If we are running with
> OpenEJB, I like to inject the JtaEntityManager OpenEJB provides. So
> my question is:
>
> How can I obtain the JtaEntityManager?
>
> Is there an easy way to get it from OpenEJB or hand over the control
> to let OpenEJB inject it into our beans field?
There isn't currently an easy way to get one from outside an EJB or
Servlet.
The "here's an object, inject into it" feature is one that has been
requested. Mostly for injecting into test cases and ejb clients, but
also for supporting third party frameworks like Struts. Haven't quite
figured out how to do it yet, though.
I guess before we focus too much on these two annotations, is the
ultimate goal to support just these two or all the Java EE annotations?
-David