Forgive me having to call a COM object from Java
but I do not have a choice. I am updating code that has been in production now for 4 years so I am stuck on JDK 1.4.
There are occasions where the COM Dispatch call will not return (more than likely a COM server side issue) but of course instead of trying to solve the problem they want me to work around it. Because this COM system has proven to not be Thread Safe I protect access to it with a Mutex class I created. The enhancement I need to add is to release the Mutex when the thread runs too long. This part is easy. However I have a Thread that is still running and being be a good programmer I would like to clean it up. Normally if this thread was in a BLOCKED state I would just interrupt it. However without being able to perform a Heap Dump when this situation arises I cannot tell what state the Thread is in. The behavior of not returning is not repeatable at least as far as I am concerned as it is another Vendor and of course the problem really does not exist
I do not have access to the C++ COM code at the moment and I don't like looking at M$ COM crap anyway. Assuming that my Java Thread is making a COM call that results in a DCOM call (The COM interface is calling out to another COM object overseas) what do you think the state of my thread would be in and would sending an interrupt be worthwhile? I know that if the Thread is in a RUNNING state that an interrupt just sets the interrupt flag and that is it.
And no I cannot throw everything away and start over with a pure java solution
thanks for your suggestions!
Doug