Re: Limit number of COM+ sessions



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?


Thanks for your suggestions.


On Feb 21, 6:49 pm, Remote_User <ami...@xxxxxxxxx> wrote:
Willy,
         Yes, the activation type is "Server application".

         Thanks a lot for the suggestions ! Will try them out.

Thanks.

On Feb 21, 1:20 pm, "Willy Denoyette [MVP]"



<willy.denoye...@xxxxxxxxxx> wrote:
"Remote_User" <ami...@xxxxxxxxx> wrote in message

news:4f2f8eba-3a35-4d23-87b0-ad6add7b6e2c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Willy,
            Yes, this will be on the server side component.

Server side? I 'm talking about the activation option,COM+know two kind of
activation types "Server" and "Library". Server means that the component is
hosted in a separate process, Library means that it is instantiated in your
own (the client) process.
You configure your component to run as Server or as Library by applying the
ApplicationActivation attribute at the assembly level [1].
Only Server types can be pooled, object pooling can be configured by
applying the ObjectPooling attribute to your type[2].

[1]
[assembly: ApplicationActivation(ActivationOption.Server)]

[2]
[JustInTimeActivation]
    [ObjectPooling(Enabled=true, MinPoolSize=1, MaxPoolSize=5,
CreationTimeout=10000)]
public class ....

....

Attributes of theCOM+component that can be viewed (and configured) by
means of dcomcnfg.msc.

Willy.

On Feb 20, 11:00 pm, "Willy Denoyette [MVP]"

<willy.denoye...@xxxxxxxxxx> wrote:
What kind of component is this? Only "Server" typeCOM+components can be
pooled.

Willy.

"Remote_User" <ami...@xxxxxxxxx> wrote in message

news:efb7f267-278b-4bf3-84a3-14aa69622c5d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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...@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
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...@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"Remote_User" <ami...@xxxxxxxxx> wrote in message

news:a5abe4df-7ae6-4e9f-81a4-b9ca949b3dee@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Hi All,
I have my ASP.NET application hosted inCOM+and I have my
client app. Is there any way I canlimitthe number os sessions? Say,
I have 5 client requests and they instantiate 5COM+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 -- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -

.



Relevant Pages

  • Re: Thread info
    ... > client, now when I close the applet and open another one it creates the ... is common practice for a server to have a thread pool. ... a thread is selected from the pool to service that client. ... Is there a reason you need a continuous connection and that a request-based ...
    (comp.lang.java.programmer)
  • RE: Object Pooling and JIT Activation
    ... we can not guarantee if the reference will be the first ... Provided the object pooling can pool 5 object, ... First client A call a method and pull object A from the pool, ...
    (microsoft.public.dotnet.framework)
  • Re: Client Server application design
    ... Client status is not a very important thing, ... it is reading data to the server or getting data from the server. ... advisable to create a thread whenever a client request comes in to ... Does it make sense to create a pool of processes to service the ...
    (comp.unix.programmer)
  • Re: COM+ object not being released back to the pool
    ... > COM+ server application (by making createinstance, ... > When I run the winform client for the first time, ... > the pool properly. ... Set Object pooling disabled in component's properties. ...
    (microsoft.public.dotnet.languages.csharp)
  • Image/Dokument auf Server transferieren
    ... wir entwickeln einen Rich Client, der einen Icon-Pool bzw Dokumenten ... Pool auf einem Server ...
    (de.comp.lang.java)