I am trying to learn Java EE and I have been reading for some time about JNDI, but beside some basic examples on the internet, and the same definition copied from place to place, I have found very little information that really explain the architecture. I need to know if my understanding is correct, then I have some questions:
My understanding:
JNDI
JNDI ENC
My questions:
If I have multiple application servers, and I use application server JNDI implementation (ex JBossNS), do I configure all the other servers to use that JNDI implementation for that particular server? I am basically interested in enterprise architectural and how EJBs are found between servers.
How do I configure ENC to inject remote objects found in another application server (different virtual machine). Do I use the "ejb-link" and use a global namespace for accessing the remote bean?
Related to answers, examples would be nice, and eventually links where JNDI architecture, and how the look-up is done would be helpful.
Thank you
I will try to answer my own question, maybe it will be useful to someone.
First, related to JNDI, my understanding was correct. I found a really good link (I am not sure about Java EE version), but this one explained in detail how JNDI works:
Second question was related to ENC. I was partially right, however ENC is a context in the JNDI world (as defined in the context definition for JNDI). This context is mostly used as an aliasing purposes for being able to reference your container/module/application EJB no matter what the container is. So whenever you reference something from ENC, you are redirected to the proper resource, that can reside in another module/application/application server. Another link that was usefull to me is the one below. It contains several link so moake sure you read them all:
http://www.javacodegeeks.com/2011/08/ejb-programmatic-lookup.html
Regards