I don't know if you've been trying this in the meantime, but have the JVM write a heap dump when it runs out of memory. Then you can see what's going on, fix it, and not have to try to handle it at all.
Taariq -----Original Message----- From: Sri [mailto:sri.tec...@googlemail.com] Sent: 18 March 2011 15:00 To: users@camel.apache.org Subject: catching OutOfMemoryError on the route Hello, we are getting OutOfMemoryError at some point of time on the route, but the application doesn't stop after that. so we tried to catch the Error and issue System.exit() , but Unfortunately we are unable to catch that error on .onException(OutOfMemoryError.class). is there any other way that we can this error and stop the JVM. Regards Sri -- View this message in context: http://camel.465427.n5.nabble.com/catching-OutOfMemoryError-on-the-route-tp3962278p3962278.html Sent from the Camel - Users mailing list archive at Nabble.com.