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 constructor chaining and how is it achieved in java?

796


What is the main use of generics in java?

728


Are arrays static in java?

804


What are the 7 types of characters?

851


What is JDBC Driver interface?How can you retrieve data from the ResultSet

1789


What is the super void?

701


What is difference between final and finally in java?

829


How does predicate work in java?

779


what is the major difference between linkedlist and arraylist in java?

809


Where to store local variables?

797


Can vector have duplicates in java?

717


Is java call by reference?

733


Why declare Main() method as a static in java ?

831


What are the main uses of the super keyword?

764


What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?

835