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 is the purpose of the notify() method?
what are RemoteObjects?
Which class is the immediate superclass of the menucomponent class?
Why use a datasource when you can directly specify a connection details?
Describe activation process?
Can I run seam with jdk 1.4 and earlier?
What class is used to create Server side object ?
What classes of exceptions may be caught by a catch clause?
What is a tasks priority and how is it used in scheduling?
What are the types of scaling?
Should synchronization primitives be used on bean methods?
why static class in java
Can constructors be synchronized in java?
What is the difference between a menuitem and a checkboxmenuitem?
What are the benefits of detached objects?