What Method and class used for Connection pooling ?

Answer Posted / deepak divvela

InitialContext ctx=new InitialContext();
Obj obj=ctx.lookup("jmdi provided alias name here");
javax.sql.DataSource ds=(javax.sql.DataSource)obj;
Connection con=ds.getConnection();

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between JDK and JVM?

629


Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.

511


When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?

604


What is the difference between synchronized and synchronized block?

497


What is void data type?

568






What is math floor in java?

470


What all access modifiers are allowed for top class ?

709


What are advantages and disadvantages of OOPs?

625


is there a separate stack for each thread in java? : Java thread

535


What is boolean query?

524


Are static members inherited to sub classes?

636


When do we use synchronized methods in java?

582


How can the checkbox class be used to create a radio button?

503


What is the use of System class?

604


What happens if constructor is private?

559