Since Java EE 5 does not have CDI, how does DI work in here?
Can an EJB be injected with @EJB
in a class that is a non-EJB?
Can an EntityManager
be injected with @PersistenceContext
in a class that is a non-EJB (container managed not resource local EntityManager
)? Or the only solution to bring the resources in non-EJB classes is by JNDI lookup?
By non-EJB class I mean a class that is not annotated with @Stateless
/@Statefull
or others.
EntityManager
into their objects, but it should be fairly simple to build a bridge which would let them do so, although this margin is too small to contain an explanation of that. – Nucleo