memdiscount
Programmer
Problem:
Recently, we found the issue of Dot Net COM+ components not destroyed properly.
Symptom
Objects got created but not destroyed after use. Object = Nothing is not destroying the object in some scenarios. This could lead to the hanging of the component or the server and a reboot may be required to recover.
What works and what doesn’t
Following Works:
# Client (Caller) COM + Operating System (COM + Version)
1 VB6 VB6 Windows 2000 (1.0)
2 VB6 VB6 Windows 2003 (1.5)
3 VB6 .Net Windows 2000 (1.0)
4 .Net VB6 Windows 2000 (1.0)
5 .Net VB6 Windows 2003 (1.5)
Following does not work:
# Client (Caller) COM + Operating System (COM + Version)
1 VB6 .NET Windows 2003 (1.5)
2 .NET .NET Windows 2003 (1.5)
3 .NET .NET Windows 2000 (1.0)
(Client is the caller of the COM+)
Solution:
For the Case # 1: The solution which has been found and worked is as follows:
(1) For each public method in the class, set
ContextUtil.DeactivateOnReturn = true;
(2) Override the Dispose method in the class:
protected override void Dispose(bool disposing)
{
ServicedComponent.DisposeObject(this);
}
We still need solution for Case 2 and 3.
Problem with Solution:
We have 100s of component which may have thousands of methods, it sounds like tedious to change all the components and all the methods.
Question:
Is there any other solution which can save us to do that tedious task, may be there is some fix available by Microsoft or any better solution?
Thanks
Essa Mughal
Recently, we found the issue of Dot Net COM+ components not destroyed properly.
Symptom
Objects got created but not destroyed after use. Object = Nothing is not destroying the object in some scenarios. This could lead to the hanging of the component or the server and a reboot may be required to recover.
What works and what doesn’t
Following Works:
# Client (Caller) COM + Operating System (COM + Version)
1 VB6 VB6 Windows 2000 (1.0)
2 VB6 VB6 Windows 2003 (1.5)
3 VB6 .Net Windows 2000 (1.0)
4 .Net VB6 Windows 2000 (1.0)
5 .Net VB6 Windows 2003 (1.5)
Following does not work:
# Client (Caller) COM + Operating System (COM + Version)
1 VB6 .NET Windows 2003 (1.5)
2 .NET .NET Windows 2003 (1.5)
3 .NET .NET Windows 2000 (1.0)
(Client is the caller of the COM+)
Solution:
For the Case # 1: The solution which has been found and worked is as follows:
(1) For each public method in the class, set
ContextUtil.DeactivateOnReturn = true;
(2) Override the Dispose method in the class:
protected override void Dispose(bool disposing)
{
ServicedComponent.DisposeObject(this);
}
We still need solution for Case 2 and 3.
Problem with Solution:
We have 100s of component which may have thousands of methods, it sounds like tedious to change all the components and all the methods.
Question:
Is there any other solution which can save us to do that tedious task, may be there is some fix available by Microsoft or any better solution?
Thanks
Essa Mughal