I have been reading the book Enterprise JavaBeans 3.0. All seems quite nice and fun, but I'm under the impression that in order to access beans from different containers you have to use JNDI. Is this the case?
From a java client I can access my bean by doing something like this:
then I can use the context to do a lookup for the name of my bean. That's fine, the client isn't inside of any containers and that's how I expect it to behave.
My question is: if I have a session bean living in server A, is it possible to inject a session bean living in server B to server A's session bean? Or do I have to use JNDI much in the same way I use on a standalone java client?
Also, it's not clear to me how a message could be delivered to a certain topic in one container and received from a MDB living in a different container. The way the book I'm reading explains it it seems that I would have to resort to jndi in order to create a consumer on a different machine.