https://issues.jboss.org/browse/RAILO-3208

Implemented the recommended cleanup thread.