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
What must a class do to implement an interface?
What are JTA/JTS and how they used by client?
How primary key is implemented in Oracle?
What restrictions are placed on the values of each case of a switch statement?
What is threadfactory?
What is the difference between java class and bean?
Write a program to show synchronization?
Which characters may be used as the second character of an identifier, but not as the first character of an identifier?
Can constructors be synchronized in java?
Can I use javascript to submit a form?
Where can I find seam examples and documentation?
What is bean? Where can it be used?
Why are some of the class and element names counter-intuitive?
What are the pros and cons of detached objects?
What are the types of scaling?