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 a finally block? Is there a case when finally will not execute?

540


What is jit compiler ?

568


This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }

553


Whats the difference between notify() and notifyall()?

560


How do you delete a list in java?

522






Tell me about different OOPS concepts.

581


What do you understand by a Static Variable?

619


Is a class an object?

569


What is the purpose of using break in each case of switch statement?

559


What does the “final” keyword mean in front of a variable? A method? A class?

540


Why is logger singleton?

554


What is an infinite loop in java? Explain with an example.

574


What is the static keyword?

579


When can you say a graph to be a tree?

626


What are the ways in which a thread can enter the waiting state?

501