Last post Apr 11, 2014 02:43 AM by Mikesdotnetting
Mar 29, 2014 01:21 AM|thanjaipvr|LINK
I have written a class for Writing output of the SSRS output to network folder. The GenerateReport Method in a CommonClass is called by all Report(Asp.net Web Form) in a Web Application. Concurrent User is 500+ and scalled to 20% annually.
Please suggest whether to keep the class
1) Singleton - if I use singleton on report class
Do I need to lock all the three method/one method (GenerateReport) to avoid concurrent issue sine all report which is web form would call this method?
2) Static Method - if I made all the three method as static
will it not cause performance issue since for each report generation it create one object and when it will destroyed.
Please suggest best approach.
Thanks and Regards
Mar 29, 2014 05:29 AM|Mikesdotnetting|LINK
I would make the methods static. They are just utility methods and you shouldn't need to instantiate a class to use them.
Apr 11, 2014 01:23 AM|thanjaipvr|LINK
If I made that method as static, it can be accessed by multiple user. so concurrency issue would come, since the method execute respective ssrs report based on the parameter and write the output to network folder,
Apr 11, 2014 02:43 AM|Mikesdotnetting|LINK
I would also make the class static.