Last week I started working on the existing code for a web service client, which was applied to singleton . I have never considered doing this myself, so I started looking for ideas from those people who have a deep understanding of tackling etc. I did not get an unanimous answer about it. Anyone with ideas: Does the singleton solution come with the threat of blocking calls? Is it better to use memory?
Some such ASP.net runtime works like this.
You receive a request ... Assume this is the first request when you get the ASP.NET application. Now on the basis of mapping, IHttpHandlers and IHttpModules will be a few things.
Run-time will request the first time with unique handler and unique examples of modules. If this is the first request and no one is an Istream event in IHttpModule or your global .sx that will still set fire. After that the request will be serviced with all IHttpMoudles and IHttpHandler.
Now, if the second request is being received, the first time the request is being requested is no independent IHttpHandler or IHttpModules, the ASP.NET runtime then creates new examples for the service. % Not sure what the life-span of IHttpHandler and the HTTP module are, but you can look at MSDN.
If you have objects and things that you want to maintain for the duration of the request you should keep in context that is executing your request. You can do several ways, but I suggest That you start searching for later instead of IHttpModules. They are quite powerful.
In addition, if you use the HTTP application class in the sub-category and in your Global. ASX file, then you will have a handy example of your HTTPSP application object created by ASP.Net runtime. And accessed through the ApplicationInstance property on the HttpContext type.
So yes, by pooling it usually means that there is a pool of objects laying around you, whenever a request of this type is required for a request, then one from the pool Will grab and serve the request. Once requested that the object has returned to the pool for reuse.
Comments
Post a Comment