[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

igalvelis

8/9/2007 3:16:00 PM

Hello,
I have a COM+ component which i am trying to use from a .Net
application. I have a requirement to make it hang-safe, so that if any
function in COM+ would hang, the application itself would be able to
recover.

Of course the correct approach would be to eliminate all hangs in COM+
component., but nobody would give me the time or tools for that ;).

So what i am currently doing is starting a new thread, creating the COM
+ component there, calling its methods. The problem is that this
approach doesn't help, because when a COM+ method is invoked, the
WndProc method seems to lock up. I am guessing that there is some kind
of a proxy between the COM+ and managed code.

Is there a simple way to workaround that?
Could using a thread in COM+ solve that problem?

Regards,
Ignas

1 Answer

Johannes Passing

8/9/2007 4:45:00 PM

0

Hi Ignas,

is your COM+ component in-process (Library application) or
out-of-process? Then what is the apartment model of the COM+ class you
are instantiating and which apartments do your threads use (the main
thread seems to be STA, but what about the helper thread)? As your
problem seems to be apartment-related, this information would help.

--Johannes

igalvelis@gmail.com wrote:
> Hello,
> I have a COM+ component which i am trying to use from a .Net
> application. I have a requirement to make it hang-safe, so that if any
> function in COM+ would hang, the application itself would be able to
> recover.
>
> Of course the correct approach would be to eliminate all hangs in COM+
> component., but nobody would give me the time or tools for that ;).
>
> So what i am currently doing is starting a new thread, creating the COM
> + component there, calling its methods. The problem is that this
> approach doesn't help, because when a COM+ method is invoked, the
> WndProc method seems to lock up. I am guessing that there is some kind
> of a proxy between the COM+ and managed code.
>
> Is there a simple way to workaround that?
> Could using a thread in COM+ solve that problem?
>
> Regards,
> Ignas
>


--
Johannes Passing - http:...