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
What is singlecall activation mode used for in .net?
Difference between machine.config and web.config?
Can "this" be used within a static method?
What is the transport protocol you use to call a seb service soap?
Explain how do assemblies find each other?
What is class library in .net
why you wouldn't want to write into it even if you could
What is the difference between a debug and release build?
Explain what are the deferred execution and the immediate execution in linq?
Is .net a programming language?
i m fresher,hav SQL knowledge but in my ofc. i hav to work on dotnet. so plz tell me how to learn it,? from where to stat? i hav C prog. knowledge, ASP.net
What is .net assembly?
Describe the use of following com+ services jit activation, queued components, object pooling.?
Explain how viewstate is being formed and how it's stored on client in .net?
What is the advantage of packaging over xcopy in .net?