The Bean Provider uses the EJB annotation to annotate a field or setter property method of the bean class as a target for the injection of an EJB reference. The reference may be to a session bean�s business interface or to the local home interface or remote home interface of a session bean or entity bean. The following example illustrates how an enterprise bean uses the EJB annotation to reference another enterprise bean. The enterprise bean reference will have the name java:comp/env/com.acme.example.ExampleBean/myCart in the referencing bean�s naming context, where ExampleBean is the name of the class of the referencing bean and com.acme.example its package. The target of the reference must be resolved by the Deployer.
I am confused - is this ALL one has to do to inject an EJB reference? Don't we have to specify the following:
Nope, the container can figure out based you your interface, what to inject.
Now, if there is ever a conflict where there could be two or more possibilities, then you can include the JNDI name to help the container out. There are attributes that you can include with @EJB, as in all EJB Annotations, it is just that EJB3 has these smart defaults.