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

How is a java object message delivered to a non-java client?

655


What is JTS?

1943


Why does the option tag render selected=selected instead of just selected?

789


Do you think that java should have had pointers?

696


Write a program to show synchronization?

774






What is colon_pkg_prefixes and what is its use?

2085


What is an abstract method?

677


What are the different algorithms used for clustering?

657


What classes of exceptions may be caught by a catch clause?

640


What value does read() return when it has reached the end of a file?

629


What is ioc concept & explain it?

702


How would you reatach detached objects to a session when the same object has already been loaded into the session?

789


How to pass parameters in RMI?

1821


What is Remote Server?

1776


How to deploy Jar, War files in J2EE?

2255