Sagar Kale wrote: Hi,
Does anyone knows how to destroy Spring Application Context?
I create few resources in application context like RMI objects. When next time I run, I get error saying the port already in use. Then I have to close eclipse and start again for next testing. If I close Eclipse and run again, it does not give problem. But if I run once and run again without closing eclipse, I get error saying port is already in use. The application context does not get destroyed. How do I destroy application context?
Thanks
Just stop your server. How are you deploying, running your app. Obviously, that is still running, so you can just stop it.
Also, you can call close() on your applicationContext instance if you have a reference to it.
Mark