Hi.

If you are using the static functions without any locking/
synchronization that stops multiple threads from running the code
simultaneously, then a static function is merely a instance-function
without the context of an object instance. The actual code produced is
not that different.
The instant you introduce locks/synchronization/semaphores etc (or
call frictions/ methods/ properties etc that does), you are
introducing bottlenecks.
Sometimes you have to, but you should keep it to a minimum.

I think it's more what you do than where you do it...

Cheers...

On 12 Juli, 14:41, "C." <[email protected]> wrote:
> Hello,
>
> I have always made CRUD methods on my Business Objects static.
> However, after going through the MS cert training kit 70-515, I came
> across this:
>
> "if the business layer uses static methods (or shared methods, in
> Visual Basic), the ObjectDataSource can use these
> methods without creating an instance of the actual business object. In
> this case, however, keep
> in mind that you could end up with performance issues related to
> thread contention as multiple
> requests try to access the same static method."
>
> This passage would seem to suggest that each thread can only enter a
> static method one at a time. If so, wouldn't this cause scalability
> issues if a static method is used frequently in an application?
>
> I had never heard this, any explanation would be appeciated!
>
> Chris

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to