B
BillGatesFan
I have a web service which calls a .NET queued serviced component in
COM+. I turned statistics on for the component. I call the component
10 times, 10 objects get created but they do not go away. I'm calling
Marshal.ReleaseComObject after I make each call.
[WebMethod]
public NotifyResponse Notify(NotifyRequest reqMessage)
{
try
{
string progid = "MyComponent";
MyComponent=
(IMyComponent)Marshal.BindToMoniker("queue:/new:" + progid);
if ( MyComponent != null)
{
MyComponent.Notify(XMLMessage);
}
return resMessage;
}
catch (Exception e)
{
ErrorLog.Log(Severity.Error, "An exception was
thrown:" + e.Message);
return resMessage;
}
finally
{
Marshal.ReleaseComObject(MyComponent);
}
}
COM+. I turned statistics on for the component. I call the component
10 times, 10 objects get created but they do not go away. I'm calling
Marshal.ReleaseComObject after I make each call.
[WebMethod]
public NotifyResponse Notify(NotifyRequest reqMessage)
{
try
{
string progid = "MyComponent";
MyComponent=
(IMyComponent)Marshal.BindToMoniker("queue:/new:" + progid);
if ( MyComponent != null)
{
MyComponent.Notify(XMLMessage);
}
return resMessage;
}
catch (Exception e)
{
ErrorLog.Log(Severity.Error, "An exception was
thrown:" + e.Message);
return resMessage;
}
finally
{
Marshal.ReleaseComObject(MyComponent);
}
}