@EJB annotation vs JNDI lookup
问题 Is there any situation where it's better to use JNDI than to inject a stateless session bean using the @EJB annotation? We're using JSF 1.2 with Sun Application Server 9.0_01. Our team is debating which approach is better when using SLSBs in a Managed Bean. I've read the following questions, but was wondering if there was a situation where lookup is preferred. EJB3 - obtaining bean via injection vs lookup - what are the differences, implications, gotchas? @EJB injection vs lookup -