whats is mean by jndi

Answer Posted / abhinandan

JNDI is used to create instances of object and passing a
reference of the object to the server.Through JNDI one can
access the particular object through an unique name
associated with the particular Object. Eg

Hashtable ht = new Hashtable();
ht.put("Context.InitialContext","---");
ht.put("URL.ProviderURL","t3://localhost:1099/");
Context cntx = new InitialContext(ht);
DataSource ds =(DataSource)cntx.lookup("TestDataSource");
Connection con = ds.getConnection();

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why a component architecture for the java platform?

776


What is jboss?

761


What is the difference between RMI registry and OS Agent?

866


Which are the different segments of memory?

816


difference between  ejb,struts,hibernate,spring and jsp

2560


What is prototype?

813


Is the session factory thread safe?

905


which book is better for jdbc ,servlets and jsp

1832


What is the relationship between the canvas class and the graphics class?

752


Why does the tag url-encode javascript and mailto links?

780


What is glasgow?

782


What are externizable interface?

786


Name three subclasses of the component class?

826


Why use POJO when I can use hashmap

2264


Can you give me a simple example of using the requiredif validator rule?

845