title: Java EE 5 dependency injection?
body: <p>Since Java EE 5 does not have CDI, how does DI work in here?</p>
  
  <p>Can an EJB be injected with <code>@EJB</code> in a class that is a non-EJB? 
  Can an <code>EntityManager</code> be injected with <code>@PersistenceContext</code> in a class that is a non-EJB (container managed not resource local <code>EntityManager</code>)? Or the only solution to bring the resources in non-EJB classes is by JNDI lookup?</p>
  
  <p>By non-EJB class I mean a class that is not annotated with <code>@Stateless</code>/<code>@Statefull</code> or others. </p>