Threading problems are the same, your object should be context
agnostic and threadsafe.
Instance creation is different, with static variables, the runtime
guarantees that only one object is created. With application objects,
your own program must assure not to create more than one instance.
HTH
// Ryan
On 12/20/05, Peter van der Weerd <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I was used to specifiy global objects int the <object> tag in a global.asa
> file.
>
> It is still possible to do so in the dotnet environment, but I think its a
> pain to do so, because you need a lot of casts and the way you access those
> global objects is rather verbose. Its something like
>
> MyObject obj =
> (MyObject)context.Application.StaticObjects.GetObject("MyObject");
>
> It is also possible to declare only static variables in a class, and use
> them instead of the <object> tag.
> One can think of
>
> public class MyGlobals
> {
> public static MyObject myObject = new MyObject();
> }
>
> and then in a ashx or aspx file:
> MyGlobals.MyObject......
>
> However, I'm not sure what the consequences are.
> Can anybody explain what the exact difference is (I mean differences with
> respect to threading, instacing, etc)
>
> Thanks a lot.
>
> Peter
>
> ===================================
> This list is hosted by DevelopMentor(r) http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com
>
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com