c***@gmail.com
2008-08-25 21:31:53 UTC
I have some code for a Web service that makes a remoting call.
OnStart of this service, I register the a HTTP channel.
I maintain a global static instance of type Manager at the same time
(singleton).
When my service receives a message/request, calls Manager.Process()
method, and Process calls MyRemoting.Activate(someType, "xxxxx");
Something like:
public class MyRemoting
{
public static object Activate(Type type, string url)
{
return Activator.GetObject(type, url);
}
}
My question is, is this thread-safe? Will multiple requests work fine
when hitting my service at the same time?
Since I don't have any state stored for the MyRemoting class, and the
static instance of Manager is called ever time.
Any help is appreciated.
Thanks.
OnStart of this service, I register the a HTTP channel.
I maintain a global static instance of type Manager at the same time
(singleton).
When my service receives a message/request, calls Manager.Process()
method, and Process calls MyRemoting.Activate(someType, "xxxxx");
Something like:
public class MyRemoting
{
public static object Activate(Type type, string url)
{
return Activator.GetObject(type, url);
}
}
My question is, is this thread-safe? Will multiple requests work fine
when hitting my service at the same time?
Since I don't have any state stored for the MyRemoting class, and the
static instance of Manager is called ever time.
Any help is appreciated.
Thanks.