Вопрос

When I use

string computerName;
string applicationName;

catalog = new COMAdminCatalog();
if (computerName != ".")
{
    catalog.Connect(computerName);
}
catalog.StartApplication(applicationName);

the com+ application runs but when I check the component's status in component service I can't see any object in each component. There's nothing in object, activated and pooling columns.

How do I make the objects show up?

Это было полезно?

Решение

The code you show is starting the COM+ Application, but the Objects, Activated, Pooled, In Call and Call Time (ms) columns refer to how many Objects have been started within that Application.

An Application is the process that hosts the service. Each Object is an instance of the service.

Normally there are no Object instances created automatically when you start the Application, they are created when you specifically instantiate them, by calling New (VB), CreateObject (VB) or CoCreate... (C++).

However, you can set that the Objects are pooled. When the objects are pooled, the minimum number of objects should be started when the Application is started. The object pooling was traditionally set by right clicking on the class in Component services, choosing Properties->Activation and setting the correct properties there. In C# this can be set by using the ObjectPooling attribute on the class and also in the Component Services.

Does this help you?

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top