[keycloak-dev] EntityManager not injected into Jboss Module
Stian Thorgersen
sthorger at redhat.com
Tue Sep 15 07:30:50 EDT 2015
Providers should be written as POJO's. There's no support for EJBs, CDI or
any other JavaEE features. You need to retrieve the EntityManager yourself
using the good old Persistence class.
On 15 September 2015 at 01:53, alex orl <alex_orl1079 at yahoo.it> wrote:
> I'm working with jboss wildfly 9. I have a provider deployed as module
> into the modules directory.
> Then i have a jpa project with DAO pattern writing and reading inside my
> database. I want to handle the DAO transaction using JTA but in order to
> make the DAO class visibile to myprovider i need to put the DAO JPA project
> inside the modules directory too.
> Now i m facing the real problem: it seems i cannot use the
> PersistenceContext annotation to inject the entity manager into my
> EntityManager variable wich is always null. Why i cannot inject the a
> context into a jar modules? What am i wrong?
>
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20150915/c8ba82ff/attachment.html
More information about the keycloak-dev
mailing list