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
Why a component architecture for the java platform?
What is jboss?
What is the difference between RMI registry and OS Agent?
Which are the different segments of memory?
difference between ejb,struts,hibernate,spring and jsp
What is prototype?
Is the session factory thread safe?
which book is better for jdbc ,servlets and jsp
What is the relationship between the canvas class and the graphics class?
Why does the tag url-encode javascript and mailto links?
What is glasgow?
What are externizable interface?
Name three subclasses of the component class?
Why use POJO when I can use hashmap
Can you give me a simple example of using the requiredif validator rule?