Posts Tagged ‘Pooling’

In my earlier post on WCF behaviors I had given some code snippets on how we can implement pooling in WCF using Behaviors.In this series of posts I am planning to elaborate on the implementation on the same.So to start with the question What is Pooling? needs to be answered.Pooling is a technique where resources are recycled to avoid expensive creation and release of resources.Once the resources are recycled and sent back to pool they lose all their state and identity and are ready to be used again.

To start with first I have defined an interface IResourcePool which defines the contract to acquire and release an object back to the pool.

public interface  IResourcePool
    object Acquire();
    void Release(object resource);