Thought others may benefit from my figuring out how to do this. I had EJB A invoking EJB B. They both started out located on the same EJB instance, so EJB A just does
Now, a late-arriving requirement is to move B onto a different server. I want to minimize source code changes. I originally modified the deployment descriptor jboss.xml; that worked, but wanted something even simpler so I wouldn't have to rebuild the jar, since we use shell scripts to move from our test environment to our prod environment, and I don't want to be ripping the jars apart to that.
So next I looked at using ExternalContext, but that appears to only allow hooking up the root of a remote NamingContext. Finally, I searched these forums and found NamingAlias. This worked!
This is perfect for us, since we only have to change the jboss.jcml file on each platform, which is custom anyway. And the neat thing is that the FromName is only a partial name; the full EJB name is com/mycompany/ejb/A/A. Am I correct in believing that NamingAlias is JBoss-specific?