Limit number of COM+ sessions

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

    Limit number of COM+ sessions

    Hi All,
    I have my ASP.NET application hosted in COM+ and I have my
    client app. Is there any way I can limit the number os sessions? Say,
    I have 5 client requests and they instantiate 5 COM+ sessions on the
    server and on the 6th one I want that to get blocked and tell the user
    that the server is busy pls try later or something like that.
    Can this be done? I am on .NET FW1.1.

    Thanks !
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Limit number of COM+ sessions

    You can't do this on the app level, but you can do it on the component
    level. You would configure your component to use object pooling, setting
    the maximum size of the pool to 5. Then, when the 6th request comes in, it
    will block until an object is ready to be used from the pool.

    Of course, you have to be careful, depending on what other services that
    you are applying to your components, object pooling might not make sense.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Remote_Use r" <amitmv@gmail.c omwrote in message
    news:a5abe4df-7ae6-4e9f-81a4-b9ca949b3dee@u6 9g2000hse.googl egroups.com...
    Hi All,
    I have my ASP.NET application hosted in COM+ and I have my
    client app. Is there any way I can limit the number os sessions? Say,
    I have 5 client requests and they instantiate 5 COM+ sessions on the
    server and on the 6th one I want that to get blocked and tell the user
    that the server is busy pls try later or something like that.
    Can this be done? I am on .NET FW1.1.
    >
    Thanks !

    Comment

    • Remote_User

      #3
      Re: Limit number of COM+ sessions


      Hi Nicholas,
      Thank you for the post. I am not able to find the
      Object Pooling property for my component. There will be difference
      when compared to Win2000 and XP I believe?

      Thanks.

      On Feb 20, 9:54 pm, "Nicholas Paldino [.NET/C# MVP]"
      <m...@spam.guar d.caspershouse. comwrote:
          You can't do this on the app level, but you can do it on the component
      level.  You would configure your component to use object pooling, setting
      the maximum size of the pool to 5.  Then, when the 6th request comes in,it
      will block until an object is ready to be used from the pool.
      >
          Of course, you have to be careful, depending on what other services that
      you are applying to your components, object pooling might not make sense.
      >
      --
                - Nicholas Paldino [.NET/C# MVP]
                - m...@spam.guard .caspershouse.c om
      >
      "Remote_Use r" <ami...@gmail.c omwrote in message
      >
      news:a5abe4df-7ae6-4e9f-81a4-b9ca949b3dee@u6 9g2000hse.googl egroups.com...
      >
      >
      >
      Hi All,
              I have my ASP.NET application hosted in COM+ and I have my
      client app. Is there any way I can limit the number os sessions? Say,
      I have 5 client requests and they instantiate 5 COM+ sessions on the
      server and on the 6th one I want that to get blocked and tell the user
      that the server is busy pls try later or something like that.
              Can this be done? I am on .NET FW1.1.
      >
      Thanks !- Hide quoted text -
      >
      - Show quoted text -

      Comment

      • Nicholas Paldino [.NET/C# MVP]

        #4
        Re: Limit number of COM+ sessions

        Are you looking in the Component Services Manager, or are you trying to
        do this through code?


        --
        - Nicholas Paldino [.NET/C# MVP]
        - mvp@spam.guard. caspershouse.co m

        "Remote_Use r" <amitmv@gmail.c omwrote in message
        news:efb7f267-278b-4bf3-84a3-14aa69622c5d@s1 3g2000prd.googl egroups.com...

        Hi Nicholas,
        Thank you for the post. I am not able to find the
        Object Pooling property for my component. There will be difference
        when compared to Win2000 and XP I believe?

        Thanks.

        On Feb 20, 9:54 pm, "Nicholas Paldino [.NET/C# MVP]"
        <m...@spam.guar d.caspershouse. comwrote:
        You can't do this on the app level, but you can do it on the component
        level. You would configure your component to use object pooling, setting
        the maximum size of the pool to 5. Then, when the 6th request comes in, it
        will block until an object is ready to be used from the pool.
        >
        Of course, you have to be careful, depending on what other services that
        you are applying to your components, object pooling might not make sense.
        >
        --
        - Nicholas Paldino [.NET/C# MVP]
        - m...@spam.guard .caspershouse.c om
        >
        "Remote_Use r" <ami...@gmail.c omwrote in message
        >
        news:a5abe4df-7ae6-4e9f-81a4-b9ca949b3dee@u6 9g2000hse.googl egroups.com...
        >
        >
        >
        Hi All,
        I have my ASP.NET application hosted in COM+ and I have my
        client app. Is there any way I can limit the number os sessions? Say,
        I have 5 client requests and they instantiate 5 COM+ sessions on the
        server and on the 6th one I want that to get blocked and tell the user
        that the server is busy pls try later or something like that.
        Can this be done? I am on .NET FW1.1.
        >
        Thanks !- Hide quoted text -
        >
        - Show quoted text -

        Comment

        • Willy Denoyette [MVP]

          #5
          Re: Limit number of COM+ sessions

          What kind of component is this? Only "Server" type COM+ components can be
          pooled.

          Willy.

          "Remote_Use r" <amitmv@gmail.c omwrote in message
          news:efb7f267-278b-4bf3-84a3-14aa69622c5d@s1 3g2000prd.googl egroups.com...

          Hi Nicholas,
          Thank you for the post. I am not able to find the
          Object Pooling property for my component. There will be difference
          when compared to Win2000 and XP I believe?

          Thanks.

          On Feb 20, 9:54 pm, "Nicholas Paldino [.NET/C# MVP]"
          <m...@spam.guar d.caspershouse. comwrote:
          You can't do this on the app level, but you can do it on the component
          level. You would configure your component to use object pooling, setting
          the maximum size of the pool to 5. Then, when the 6th request comes in, it
          will block until an object is ready to be used from the pool.
          >
          Of course, you have to be careful, depending on what other services that
          you are applying to your components, object pooling might not make sense.
          >
          --
          - Nicholas Paldino [.NET/C# MVP]
          - m...@spam.guard .caspershouse.c om
          >
          "Remote_Use r" <ami...@gmail.c omwrote in message
          >
          news:a5abe4df-7ae6-4e9f-81a4-b9ca949b3dee@u6 9g2000hse.googl egroups.com...
          >
          >
          >
          Hi All,
          I have my ASP.NET application hosted in COM+ and I have my
          client app. Is there any way I can limit the number os sessions? Say,
          I have 5 client requests and they instantiate 5 COM+ sessions on the
          server and on the 6th one I want that to get blocked and tell the user
          that the server is busy pls try later or something like that.
          Can this be done? I am on .NET FW1.1.
          >
          Thanks !- Hide quoted text -
          >
          - Show quoted text -


          Comment

          • Remote_User

            #6
            Re: Limit number of COM+ sessions

            Hi Willy,
            Yes, this will be on the server side component.

            Nicholas,
            I am trying to see if there are any configuration
            settings available through the Component Services Manager.

            Thanks.




            On Feb 20, 11:00 pm, "Willy Denoyette [MVP]"
            <willy.denoye.. .@telenet.bewro te:
            What kind of component is this? Only "Server" type COM+ components can be
            pooled.
            >
            Willy.
            >
            "Remote_Use r" <ami...@gmail.c omwrote in message
            >
            news:efb7f267-278b-4bf3-84a3-14aa69622c5d@s1 3g2000prd.googl egroups.com...
            >
            Hi Nicholas,
                              Thank you for the post. I am not able to find the
            Object Pooling property for my component. There will be difference
            when compared to Win2000 and XP I believe?
            >
            Thanks.
            >
            On Feb 20, 9:54 pm, "Nicholas Paldino [.NET/C# MVP]"
            >
            >
            >
            <m...@spam.guar d.caspershouse. comwrote:
            You can't do this on the app level, but you can do it on the component
            level. You would configure your component to use object pooling, setting
            the maximum size of the pool to 5. Then, when the 6th request comes in, it
            will block until an object is ready to be used from the pool.
            >
            Of course, you have to be careful, depending on what other services that
            you are applying to your components, object pooling might not make sense..
            >
            --
            - Nicholas Paldino [.NET/C# MVP]
            - m...@spam.guard .caspershouse.c om
            >
            "Remote_Use r" <ami...@gmail.c omwrote in message
            >
            news:a5abe4df-7ae6-4e9f-81a4-b9ca949b3dee@u6 9g2000hse.googl egroups.com...
            >
            Hi All,
            I have my ASP.NET application hosted in COM+ and I have my
            client app. Is there any way I can limit the number os sessions? Say,
            I have 5 client requests and they instantiate 5 COM+ sessions on the
            server and on the 6th one I want that to get blocked and tell the user
            that the server is busy pls try later or something like that.
            Can this be done? I am on .NET FW1.1.
            >
            Thanks !- Hide quoted text -
            >
            - Show quoted text -- Hide quoted text -
            >
            - Show quoted text -

            Comment

            • Willy Denoyette [MVP]

              #7
              Re: Limit number of COM+ sessions



              "Remote_Use r" <amitmv@gmail.c omwrote in message
              news:c063fba2-b512-4f4c-881a-655d37a1d76c@q3 3g2000hsh.googl egroups.com...
              Hi,
              I changed the Max Pool size to 1 through the Component Services
              panel just to check and tried initiating the component from 2
              different clients but it gave me this error - "COM+ activation failed
              because the component could not be activated in the specified amount
              of time".
              Also I had one more question if I set the Max Pool Size to 5 and a
              6th call comes in what will the end user see or what is expected to
              happen?

              This client will get:
              "COM+ activation failed because the component could not be activated in the
              specified amount of time".

              If you already have 5 activated objects running, then you can't create a
              6th, unless one of the active objects was released to the pool while waiting
              for the time-out period, specified by the "CreationTimeou t" attribute.

              Willy.

              Comment

              • Remote_User

                #8
                Re: Limit number of COM+ sessions

                Hi,
                So I can try this then?

                - Catch this exception and display a user-friendly message
                - Have an optimum timeout value so that the (n+1) th call can be
                serviced if any of the earlier object is released back to the pool.

                Thanks.


                On Feb 21, 9:23 pm, "Willy Denoyette [MVP]"
                <willy.denoye.. .@telenet.bewro te:
                "Remote_Use r" <ami...@gmail.c omwrote in message
                >
                news:c063fba2-b512-4f4c-881a-655d37a1d76c@q3 3g2000hsh.googl egroups.com...
                Hi,
                    I changed the Max Pool size to 1 through the Component Services
                panel just to check and tried initiating the component from 2
                different clients but it gave me this error -  "COM+ activation failed
                because the component could not be activated in the specified amount
                of time".
                    Also I had one more question if I set the Max Pool Size to 5 and a
                6th call comes in what will the end user see or what is expected to
                happen?
                >
                This client will get:
                "COM+ activation failed because the component could not be activated in the
                specified amount of time".
                >
                If you already have 5 activated objects running, then you can't create a
                6th, unless one of the active objects was released to the pool while waiting
                for the time-out period, specified by the "CreationTimeou t" attribute.
                >
                Willy.

                Comment

                Working...