I would like to know what is going on "under the hood" if I use remote interfaces in JavaEE. In the project I use a stateless enterprise bean that implements a remote interface. And I can call methods in this remote interface from a client (it all runs on the same glassfish server but it should work from a different machine as well).
The remote interface is within a Java Class Library, the enterprise bean and the client both include this library, but only in the bean it gets implemented.
I am quite new to JavaEE and glassfish. I know there is a container that manages the beans and a lot of stuff which makes everything super easy, but I don´t know yet what happens behind the scenes. Could you give me a brief description of what happens on a remote call? I think it has to do something with JNDI. And if I would start my client on a completely different machine, how would JNDI find my bean on the other machine?? (Since I use netbeans with glassfish I didn´t have to configure anything in glassfish)
Thanks!
EDIT: I use dependency injection, so everything I need to access the bean is the annotation @EJB (this works because of the class library)