With Spring it's easy to understand, I configure the remote object putting the ip and the name for look-up, and Spring do the injection for me. But with EJB3, I just use @EJB annotation in a field and the EJB is injected. So the question is, how it work's? And, can I configure a different server for EJB look-up.
Basically the Annotations have "smart" defaults, so in that basic case the object reference type in your code tells the App Server which bean to inject. If there are differences betweent the reference type, or if it has to look it up in a remote app server, then you will include attributes to the @EJB to tell it where to find it. It is called only configuring to the exception. So you only have to put more stuff in there if you have to be different than the smart defaults.