users@glassfish.java.net

Re: CDI _at_PersistenceContext not working when DAO/Bean in own Jar (GFv3)

From: Sahoo <Sahoo_at_Sun.COM>
Date: Sat, 01 May 2010 06:35:06 +0530

It is not clear from your post how you are packaging your app. Do you
have an ear file containing the war and the dao jar or you deploy the
war and jar separately. More over, what is in your dao jar? Is it an EJB
jar or a jar with some entities in it?

Sahoo

Dominik Dorn wrote:
> Hi,
>
> I've created a small servlet/jax-rs service and tried to inject my
> dao's which where in another jar. Injecting of the DAOs worked,
> however their EntityManager ( annotated through
> @PersistenceContext("nameOfThePU") )
> was not injected.
>
> When I copied the DAOs to the same project, the injection works
> without a problem.
>
>
> I think thats a bug... anyone else experienced this behavior?
>
> kind regards,
> dominik
>