What is the difference between JNDI lookup(), list(), listBindings(), and search()?

devquora
devquora

Posted On: Dec 29, 2020

 

The differences among JNDI lookup(), list(), listBindings(), and search() are as follows.

JNDI lookup()JNDI list()JNDI listBindings()JNDI search()
lookup() is used to find the specified object in the given context. i.e., it looks for a single, specific object and either find it in the current context or it fails.list() is used for enumeration of the NameClassPair of all of the objects in the current context. It's a listing of all of the objects in the current context but only returns the object's name and the name of the class whose object is it. td>listBindings() is a listing of all of the objects in the current context with an object's name, a reference to the object itself, and its class name. It's used to return an enumeration of the Bindings of all of the objects in the current context.search() used to return an enumeration of all of the objects matching a given set of search criteria. It can search across multiple contexts. It can return the attributes of the objects that you desire. etc. It's the most complex and powerful but is also the most expensive.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Weblogic Interview Questions

    How does a server know when another server is unavailable?

    WebLogic Server monitors socket errors to check the availability of a server instance. As an example, if server instance A1 has associate degree open socket to server instance B1, and also the socket ...

    Weblogic Interview Questions

    How can I set deployment order for applications?

    You can set the deployment order of a Startup class, follow the instructions in Configure startup classes....

    Weblogic Interview Questions

    How do stubs work in a WebLogic Server cluster?

    Clients that are connected to a WebLogic Server cluster obtain a replica-aware stub for the object. This stub contains the load balancing logic for distributing the load among its host servers. The st...