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
To what value is a variable of the string type automatically initialized?
A user of a web application sees a jsessionid argument in the URL whenever a resource is accessed. What does this mean? a. The form must have the field jsessionid b. URL rewriting is used as the session method c. Cookies are used for managing sessions
How to determine SGA site?
What are various types of class loaders used by jvm?
Are enterprise beans allowed to use thread.sleep()?
What is jboss?
What is the difference between ear, jar and war file?
What are the call back methods in entity bean?
What is chat area? Explain.
What is a tasks priority and how is it used in scheduling?
Can I have an action without a form?
How a component can be placed on Windows?
Why does the option tag render selected=selected instead of just selected?
What are JTA/JTS and how they used by client?
How would you reatach detached objects to a session when the same object has already been loaded into the session?