Friday 20 April 2012

how to use singleton class for handling multiple request at runtime

I faced this issue when i was working with one of my web project. The issue comes in picture when i generated web stub to use web methods for a particular wsdl URL. Previously i had requirement for hitting one web port only but later i received requirement for handling multiple web port at run-time.As i had only one singleton class for dealing with one web port so i used my design pattern in which i created one hash table like bucket in which i put object first time and second time the request search for the old object inside bucket.In this way we can create multiple singleton object each referring to a separate wsdl URL. so my problem got solved.

No comments:

Post a Comment