From http://imtiger.net/blog/2012/10/28/mutil-appservers-manage/