ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
What Method and class used for Connection pooling ?
 Question Submitted By :: Nimitha
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What Method and class used for Connection pooling ?
Answer
# 1
first to get the Context object by using given bellow

  Context ic=new InitialContext();

And get DataSource object by using ic.lookup(conncetionpool
name)



your question is not proper way


   DataSource Class & getConnection method is used
connection pool
 
Is This Answer Correct ?    0 Yes 0 No
Therathna
[Process It Solutions]
 
  Re: What Method and class used for Connection pooling ?
Answer
# 2
datasource.
getDatasource.getconnection();
 
Is This Answer Correct ?    1 Yes 0 No
Ravikiran(aptech Mumbai)
 
 
 
  Re: What Method and class used for Connection pooling ?
Answer
# 3
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
Deepak Divvela
 
  Re: What Method and class used for Connection pooling ?
Answer
# 4
contex ic = new InitialContext();
DataSource sd = (datasource)ic.lookup("poolname");
Connection con = ds.getConnection();
 
Is This Answer Correct ?    0 Yes 0 No
Dsr
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
How to do validation of the fields in any project ?  2
What is the difference between set and list?  3
what is generics in jdk1.5? Bally-Technologies1
what is the difference between cd & dvd ? Satyam12
different types of threads? TCS7
what is the use of private constructor in core java? Satyam3
What is interface and its use? HCL6
How is Garbage collection done in Java? T3-Softwares2
Which java.util classes and interfaces support event handling?  2
What are Encapsulation, Polymorphism and Inheritance?  2
which one the better thread emplemented thread or extended ? Fidelity3
What is the specification of ?CODEBASE? in an applet?  1
how to write a program for chat function using core java Satyam1
When we can access the static data member without creating the object what is the need of the object in java. ssinformatics4
What is the difference between static and non-static variables?  2
Difference between array and arraylist. Sai-Softech4
Difference between overloading and Overriding. <Giving a confusing example to test the concept.> (also asked in PA Consultancy Group,iflex,Value chain,IBM,CTS,Accenture, Tarang> Symphony6
what is the JNDI?  3
Nullpointer exception is a very common exception. Why is it not made as a checked exception? Ness-Technologies1
how many ways we can serialize the java object? Satyam1
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com