Posted By:
Sandeep_Shilawat
Posted On:
Sunday, January 2, 2005 05:25 PM
Dear Darren
My friend Ajit always smiled when I told him that there seems like, the my swing application has a deadlock issues (or threading issue). I always hated him for that smile but most of the times he was right. He showed me a trick. I will tell you the same, try this
Press Ctrl+Break on your dos console if you are running on dos(Hope the process is running in forground). If you are not then run it on DOS as I do not know what to do to see stack trace on UNIX console.
Once you have the stack trace OBSERVE it for the calls being made from your calllback handler. You will find the answer. Post it if you do not find an answer and I will browse it. You can clearly see a deadlock if there is any.
I love being speculative though, I think you may see Socket.accept is waiting for ever. Looks like whatever you are using to make COM calls is stuck as it is doing that stuff synchronusly and can not do it any more for a well known Socket read problem. Solution to that is use some event notification mechnics so that you do not rely too much on that Socket read call. Meaning there will be always a next read call that you can make.
Try one more thing, the COM tool you are using must be opening some port from Client side. Try pinging in to that port. May the Socket is dead or timedout or something like that. As its third party tool there is very little you can do about it but refer to FAQ of that COM package. They might have some properties/config file
Here is I think is the best solution. Write a small java process (Server for you)which will do all the COM calling business using the third party tool. Then use messaging to talk with this process which will eliminate synch calling business. But I am not sure how easy to do this in your world...
Did any of this help(I have serious doubts :))? Do let me know... :)