I have a j2me app in which I receive a number of SMS in a process, but when sometime it has some error or exception it stops there by showing error but what happens is that the remaining SMS which actually has been sent by the Server, do not receive on port rather they stay over the port. I yet didn't close the port but due to exception occurrence my app doesn't receive those SMS, I also tried to close and open the port again at that moment but still same issue. And when I close app(exit) and restart it, I receive those remaining SMS before my new process get it's own SMS. So I have to wait for those OLD sms to discard and then move processing my new one. I need some solution that when I get exception somehow my remaining SMS on port should be discarded. Note: I am closing my port only on exit, and opening and runtime of app. Thanks