One possible solution is that you cluster the two nodes and deploy one (different) application to each.
In this case the same JNDI context is available on both instances.
But why you have such approach, if you call always an EJB remote it will have network latency and traffic.
If you deploy the applications for both the JBoss cluster do the loadbalancing and failover for you :)