GWT, Google App Engine, TimerTask or Thread in ServiceImpl throw exception

前端 未结 5 1692
星月不相逢
星月不相逢 2021-01-18 07:53

I am using GWT and Google App Engine. I have array of records and I want to update them every 30 mins. In the ServiceImpl I have the fallowing code :



        
5条回答
  •  既然无缘
    2021-01-18 08:12

    The issue is not just in App engine, but in general in any Servlet container. When one is in a service method (which you are always in Servlet container), you can not create threads and do sleeps.

    In today's scalable service world, thread.sleep is a bad thing....

提交回复
热议问题