I know serial ports are not so good but still a little hope... I am using JSSC library for communication.
Does the JSSC library have a method to detect when an established connection is lost due to hardware removal?
The jssc does not have hot plug or device removal like mechanism. Give details of your hardware and we may think of some work around.