Single Threaded Web Service

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ben

    Single Threaded Web Service

    I am needing a web service to be single threaded. Is this possible? Any
    ideas would be helpful
  • Chad Z. Hower aka Kudzu

    #2
    Re: Single Threaded Web Service

    =?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"

    Blog: http://blogs.atozed.com/kudzu

    Comment

    • Chad Z. Hower aka Kudzu

      #3
      Re: Single Threaded Web Service

      =?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"

      Blog: http://blogs.atozed.com/kudzu

      Comment

      • BillyLiu007

        #4
        RE: Single Threaded Web Service

        i am not very understand your situation, but may be .net remoting can help you
        --
        Can You?You Can.


        "ben" wrote:
        [color=blue]
        > I am needing a web service to be single threaded. Is this possible? Any
        > ideas would be helpful[/color]

        Comment

        • BillyLiu007

          #5
          RE: Single Threaded Web Service

          i am not very understand your situation, but may be .net remoting can help you
          --
          Can You?You Can.


          "ben" wrote:
          [color=blue]
          > I am needing a web service to be single threaded. Is this possible? Any
          > ideas would be helpful[/color]

          Comment

          • Ajit

            #6
            RE: Single Threaded Web Service

            Ben,

            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

            • Ajit

              #7
              RE: Single Threaded Web Service

              Ben,

              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

              Working...