Hi,
I am new to use JNDI. I want to know, that how do we bound our object to a particular 'name', and what do we mean by that. Also, if binding to a name and then looking up using the name to obtain a reference to this object, does this mean that I can access to any object running on any JVM on the internet? Or it means that looking up and obtaining the reference is only meant for the same JVM on which JBoss/any server providing the JNDI service is running.
We can bind the object to a name by using the InitialContext's bind API.
bind(name,object);
You can lookup the object by using lookup(name) and this returns you the object that mapped to the name.
I think lookup only works for the same JVM.