openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Injecting Entity Manager to POJO/Form Bean
Date Fri, 01 Jun 2007 16:03:56 GMT
Support for this is completely part of the appserver and not part of  
openjpa.  Are you sure your appserver is completely javaee5 compliant?

A couple of comments....

you use a PersistenceContextRef annotation or the equivalent xml

the object the EntityManager is to be injected into can't be some  
arbitrary class, it has to be managed in some way by the app server,  
such as an EJB class, servlet, app client main class, app client  
CallbackHandler, or jsf managed bean.  Furthermore the container has  
to create it, not your code.

thanks
david jencks

On Jun 1, 2007, at 2:22 AM, Joshua Jackson wrote:

> Dear all,
>
> How do I get the EntityManager injected to my web Form Bean / POJO?
>
> Currently I'm deploying my apps that uses openjpa as the persistence
> implementation on an appserver, but I still can not get the
> EntityManager injected in my POJO. Where can I find the reference
> regarding this?
>
> Thanks in advance
>
> -- 
> YM!: thejavafreak
> Blog: http://www.nagasakti.or.id/roller/joshua/


Mime
View raw message