=?Utf-8?B?YmVu?= <ben@discussion s.microsoft.com > wrote in
news:85DD66BD-5CDA-4BC5-B9CF-9E66BBF23660@mi crosoft.com:[color=blue]
> I am needing a web service to be single threaded. Is this possible?
> Any ideas would be helpful[/color]
Why do you need it to be single threaded? I suspect that your need is atually other and that if its a
true need, you are seeking the wrong solution.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"
=?Utf-8?B?YmVu?= <ben@discussion s.microsoft.com > wrote in
news:85DD66BD-5CDA-4BC5-B9CF-9E66BBF23660@mi crosoft.com:[color=blue]
> I am needing a web service to be single threaded. Is this possible?
> Any ideas would be helpful[/color]
Why do you need it to be single threaded? I suspect that your need is atually other and that if its a
true need, you are seeking the wrong solution.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"
Web services are inherently defined by a multithreaded apartment model so I
don’t think you can write single threaded web service. But there are
alternatives:
1. You can invoke single threaded component in you web service using thread.
Note that you can not directly invoke single threaded component in web
service. If threading model of web service doesn’t match with COM component
then you will receive an error when you try to instantiate the object. The
solution is to call the COM object from a thread that has the same threading
model as the COM object itself. In the new threads that you create, you have
the option of controlling the threading model so you can match it to the COM
component.
2. If you need single threaded web service to avoid any collision at
database side then think about using modifying or creating new stored
procedure which will handle transactions properly.
3. Remoting
Regards,
Ajit
"ben" wrote:
[color=blue]
> I am needing a web service to be single threaded. Is this possible? Any
> ideas would be helpful[/color]
Web services are inherently defined by a multithreaded apartment model so I
don’t think you can write single threaded web service. But there are
alternatives:
1. You can invoke single threaded component in you web service using thread.
Note that you can not directly invoke single threaded component in web
service. If threading model of web service doesn’t match with COM component
then you will receive an error when you try to instantiate the object. The
solution is to call the COM object from a thread that has the same threading
model as the COM object itself. In the new threads that you create, you have
the option of controlling the threading model so you can match it to the COM
component.
2. If you need single threaded web service to avoid any collision at
database side then think about using modifying or creating new stored
procedure which will handle transactions properly.
3. Remoting
Regards,
Ajit
"ben" wrote:
[color=blue]
> I am needing a web service to be single threaded. Is this possible? Any
> ideas would be helpful[/color]
Comment