0 Replies Latest reply on Mar 19, 2009 1:14 PM by wark2007

    Performance comparison of injection vs programatic lookup

      Hello! As far as I know if I have an injection like



      @In
      EntityManager entityManager;


      it will be injected for every method call independently if the method uses the entityManager or not. When using programatic lookup via


      EntityManager entityManager = (EntityManager) Component.getInstance("entityManager");



      I use the entityManager only in those methods where I need it at the cost of more handwritten code. Can someone tell me if there is a noticeable performance difference between both practices?


      Thanks!