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 state does a thread enter when it terminates its processing? : Java thread

602


What is advantage of java?

544


Can we force garbage collector to run ?

574


What is exception hierarchy in java?

592


What methods are used to get and set the text label displayed by a button object?

557






Does sprintf add a null terminator?

566


Why 1 is not a prime number?

562


How a string is stored in memory?

582


How to create com object in Java?

651


How many types of memory areas are allocated by JVM in java?

599


how can you catch multiple exceptions in java?

543


How do you add an element to a set in java?

497


How can you share data between two thread in Java?

528


How will you reverse a link list without using recursion?

600


Can bool be null?

527