Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Javeed M ShaikhRank #839 · 2.7K reputationPosted Oct 20, 2011, 10:32 AM EDT
Please refer to these articles from C# Corner:
http://www.c-sharpcorner.com/UploadFile/vmsanthosh.chn/109042007094154AM/1.aspx
http://www.c-sharpcorner.com/UploadFile/dsdaf/ConnPooling07262006093645AM/ConnPooling.aspx
The MSDN article is saying that its specific object pool implementation will increase the size of the pool up to the specified maximum. When the maximum is reached, unlike the example above, instead of throwing an exception, it makes the client wait until an object is returned to the pool, and then gives the newly returned object to the waiting client.
The MSDN article says that its specific connection pool implementation does not have a maximum size parameter - it will keep creating new connections to meet demand (eventually it will hit some system limit and the request will fail in some way that isn't specified).
Prabhu RajaRank #861 · 2.6K reputationPosted Oct 21, 2011, 1:48 AM EDT
Object Pooling:
Object Pooling is something that tries to keep a pool of objects in memory to be re-used later and hence it will reduce the load of object creation to a great extent.
For Reference:
http://www.c-sharpcorner.com/UploadFile/chinnasrihari/3973/
What is connection pooling?
Connection pooling is process of taking a connection from a pool of connections, once connection is created in the pool any application can re-use that connection.
For reference :
http://www.c-sharpcorner.com/UploadFile/munnamax/connectionpooling08112007062332AM/connectionpooling.aspx
VulpesRank #55 · 29.2K reputationPosted Oct 20, 2011, 10:32 AM EDT
Satyapriya NayakRank #47 · 31.5K reputationPosted Oct 20, 2011, 8:37 PM EDT
Object pooling is a COM+ service that enables you to reduce the overhead of creating each object from scratch. When an object is activated, it is pulled from the pool. When the object is deactivated, it is placed back into the pool to await the next request. You can configure object pooling by applying the ObjectPoolingAttribute attribute to a class that derives from the System.EnterpriseServices.ServicedComponent class.
Object pooling lets you control the number of connections you use, as opposed to connection pooling, where you control the maximum number reached.
Connection pooling increases the performance of the applications by reusing the active database connections instead of create new connection for every request.
Connection pooling Behaviour is controlled by the connection string parameters.
Follwing the the 4 parameters that control most of the connection pooling behaviour.
1. Connect Timeout
2. Max Pool Size
3. Min Pool Size
4. Pooling
Following are important differences between object pooling and connection pooling:
Creation. When using connection pooling, creation is on the same thread, so if there is nothing in the pool, a connection is created on your behalf. With object pooling, the pool might decide to create a new object. However, if you have already reached your maximum, it instead gives you the next available object. This is crucial behavior when it takes a long time to create an object, but you do not use it for very long.
Enforcement of minimums and maximums. This is not done in connection pooling. The maximum value in object pooling is very important when trying to scale your application. You might need to multiplex thousands of requests to just a few objects. (TPC/C benchmarks rely on this.)
COM+ object pooling is identical to what is used in .NET Framework managed SQL Client connection pooling. For example, creation is on a different thread and minimums and maximums are enforced.
Thanks
Vipul KelkarRank #1,061 · 1.8K reputationPosted Oct 21, 2011, 5:04 AM EDT
so in that case we can call HTTPApplicationFactory as a pool of HTTPApplication objects which assigns an HTTPAPplication object to each incoming request ?
Vipul KelkarRank #1,061 · 1.8K reputationPosted Oct 21, 2011, 6:01 AM EDT
VulpesRank #55 · 29.2K reputationPosted Oct 21, 2011, 6:16 AM EDT
Yes, what you say about HTTPApplicationFactory is correct but I don't think you can call it directly in your code - it's called by the runtime.
Vipul KelkarRank #1,061 · 1.8K reputationPosted Oct 21, 2011, 6:26 AM EDT
'call' did not literally mean calling the class :)
neways thanks vulpes..