Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is ConnectionPooling

 
Saxena Sajal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

In connection pooling a connection is taken from a pool and reused it will not try to create a new connection if pool already has connection.
Where this pool reside and how can we set the limit of a pool.is it something to be configured at Application Server or database server.
and if yes how a factory pattern look for a connection?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is correct. Connection pooling is for reuse. There are two types of pools. The most common one is a datasource on the application server. For example, Oracle provides a connection pooling datasource for use in WebLogic, WebSphere, etc. The other common one is an open source connection pooling library. A connection pool wouldn't be on the database server because you are trying to reuse connections TO the database server.

I'm not sure what you mean about the factory pattern. The library takes care of this. It tracks the status of each connection. Is it in use? Has it been returned to the pool?
 
Saxena Sajal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If we configure a maximum pool size for at WebSphere server and the more clients are accessing that application (or more connections are required ) at a time, does it mean no connection object will be obtained at that time?

 
Saxena Sajal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:That is correct. Connection pooling is for reuse. There are two types of pools. The most common one is a datasource on the application server. For example, Oracle provides a connection pooling datasource for use in WebLogic, WebSphere, etc. The other common one is an open source connection pooling library. A connection pool wouldn't be on the database server because you are trying to reuse connections TO the database server.

I'm not sure what you mean about the factory pattern. The library takes care of this. It tracks the status of each connection. Is it in use? Has it been returned to the pool?



Factory i was trying to mention for factorypattern to obtain a connection object. Is there any maximum limit of connection pool size or it depends on server to server?
In an application how one can decide how much bigger pool of connection will be needed to support that application.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are correct that WebSphere will stop creating new connections once it hits the limits you configure. The threads wait until you return a connection. This is fine as you don't want to overwhelm the database.

It is a tuning exercise to see what the right max should be.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic