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

What is the purpose of the notify() method?

600


what are RemoteObjects?

2262


Which class is the immediate superclass of the menucomponent class?

632


Why use a datasource when you can directly specify a connection details?

534


Describe activation process?

2068






Can I run seam with jdk 1.4 and earlier?

561


What class is used to create Server side object ?

1676


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

557


What is a tasks priority and how is it used in scheduling?

552


What are the types of scaling?

558


Should synchronization primitives be used on bean methods?

556


why static class in java

1277


Can constructors be synchronized in java?

621


What is the difference between a menuitem and a checkboxmenuitem?

590


What are the benefits of detached objects?

587