What are object pooling and connection pooling and difference?

Answer Posted / ritesh

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.
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.)

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How inheritance works in .net?

564


What is an anonymous method and how is it different from a lambda expression?

525


Tell us what do the following acronyms in .net stand for: il, cil, msil, cli and jit?

526


Please explain what is the difference between encrypting a password and applying a hashing?

551


What is managed code and managed data in .net?

597






What is the difference between user control an custom control? Advantages/disadvantages?

576


Describe the use of following com+ services jit activation, queued components, object pooling.?

536


Different between .net & j2ee ?

594


What are the differences between an interface and an abstract class in .net?

524


Explain what are an object and a class?

569


what will do to avoid prior case?

597


Explain the difference between the stack and the heap?

538


Is there any attempt system for microsoft technology papers?

1299


Difference between dispose and finallize method?

668


What are the differences between user control and server control?

594