Make JsonHandler and JsonService thread-safe