Question: how does jndi lookup work?
Answer: So basically you create objects and register them on the directory services which you can later do lookup and execute operation on. JNDI is an API specified in Java technology that provides naming and directory functionality to applications written in the Java programming language.