I use GWT and Google App Engine. I have an array of records and I want to update them every 30 minutes. In ServiceImpl, I have the code:
new Timer().schedule(new TimerTask(){ @Override public void run() { try { Thread.sleep(30000); } catch (InterruptedException e) { e.printStackTrace(); } result = updateFeeds(); } }, 30000,Long.MAX_VALUE);
When I launch the application and when I receive:
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.List org.joke.planet.client.FeedService.loadFeeds()' threw an unexpected exception: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
in the first line or embedded code.
My question is: HOW can I make a background worker who works in the GWT + AppEngine service?
java multithreading google-app-engine gwt
Joke
source share