adding shutdown-bean; adapting shell to pass in app context to run for server