Apache Shiro work save point, refactoring and cleanup