In My opinion, for Servlets,
when you do a look up inside doGet or doPost method hence it will be specific for each request
thread and will not be at instance level hence not shared.
Same for Stateless Session Bean(SLSB),
you should do a look up through JNDI or EJBCONTEXT inside a business method.
In such cases, JNDI is better than DI because DI is at the instance variable level.
For SLSB, there is no guarantee that stateful session bean(or any other client specific information) would be saved. Hence next users may or may not get the same Stateful session bean