I am confused a bit. Is there a documentation which can explain which one is better or whether JNDI itself uses HTTP?
When should I be used JNDI? Does it make sense using JNDI to consume web services, or whether there are better/faster methods to consume web services?
Edit: Adding a bit more context here. I am currently making a web service calls via HTTP REST. I am trying to understand that by invoking those services by JNDI, will I get any performance improvement?
They aren't in competition for a moment. HTTP is used to communicate with HTTP servers. JNDI is used to communicate with naming services such as LDAP, the RMI registry, COS Naming, DNS, etc.
The overlap is zero.