My first question would be - do we really need to close ProcessEngine upon console undeployment? I can think of few cases where such approach could be dangerous - just because console was down (either by administrator or server failure) whole process engine will be stopped. Is this desired?
In my opinion console shall be treated as optional (non intrusive) component so removing it shall not affect the process engine.
Does it affect only Tomcat?
If it comes to probable solution, we could register listeners (ServletContectListeners) for console to close down process engine on application destroy.