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 :
You sir, could benefit from appengine's newish ThreadManager class.
https://developers.google.com/appengine/docs/java/backends/overview#background_threads
Use ThreadManager.currentRequestThreadFactory() to get a Thread factory which will interrupt spawned threads as soon as the current request is finished, and ThreadManager.backgroundThreadFactory() to spawn threads that will last as long as you please (but only works on backends)
For frontend requests, it is recommended to keep track of your threads, and call thread.join() if you want them to finish before appengine's request filter interrupts them.