I know that this is not \"best practice\" but I would like to know if I can auto restart tomcat if my deployed app throws an outofmemory exception
What about something like this? -XX:OnOutOfMemoryError="exec \`ps --no-heading -p $$ -o cmd\`"
-XX:OnOutOfMemoryError="exec \`ps --no-heading -p $$ -o cmd\`"