The JEE specification states that an EJB injection like this:
@EJB MyInterface myBean;
will create en entry in the Enterprise Naming Context, viz. java:comp/env/.MyInterface/myBean. It is up to the deployer to bind this context entry to a real value and to inject this value in the myBean field.
Now I have the feeling I am missing something here:
Why is the context entry necessary? An instance of the requested EJB will be injected, so why is the entry in the context needed? Why does the injection has to happen via the context entry?