How do you implement Connection Pooling

Showing Answers 1 - 4 of 4 Answers

Vidhiya

  • Jun 1st, 2005
 

Connection Pooling can be implemented by the following way. 
 
* A javax.sql.ConnectionPoolDataSource interface that serves as a resource manager connection factory for pooled java.sql.Connection objects. Each database vendors provide the implementation for that interface. 
 
For example, the oracle vendors implementation is as follows: 
 
oracle.jdbc.pool.oracleConnectionPoolDataSource Class. 
 
* A javax.sql.PooledConnection interface encapsulates the physical connection for the database. Again, the vendor provides the implementation.

  Was this answer useful?  Yes

Hari Prasad

  • Jun 26th, 2005
 

please send the appriate connection pool implementation for web logic app server , with connection code , ie how to connect the database with web logic server , i want the code in the program,

  Was this answer useful?  Yes

G.kirankumar

  • Oct 6th, 2005
 

code for connecting the connection pooling

InitalContext ic=new InitialContext();

Hashtable ht=new Hashtable();

ht.put("Context.INITIAL_PROVIDER",weblogic.jndi.InitialCla)

//u have to set weblogic properties first and the jndi name that u r defining in 

//weblogic while creating the connectionpool

ht.put("Context.PROVIDER_URL",t3://localhost:7001);

ht.put("Context.SECURITY_PRINCIPAL",username);

ht.put("Context.SECURITY_CREDENTIALS",passwordof weblogic);

DataSource ds=(DataSource)ic.lookup("jndiname");

Connection con=ds.getConnection();

Statement stmt=con.createStatement();

  Was this answer useful?  Yes

tgnanakumar

  • Apr 23rd, 2010
 

By using the J2EE servers like WebLogic, WebSphere, jBoss, Tomcat.  We have to configure the data source object and connection pool object and supply the values as part of connection pool configuration and then data source is responsible to get the connections from data base and hold the connections with it.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions