I have a Java client app that via webservices executes remote calls on an application server. Now, I need to execute some tasks that may run for a long time, so that I cannot wait for appserver response. So, I made up a machinery that allows me to execute these tasks in 'background'. Anyway, to know when a remote job is ended, my client at the moment executes in a separate thread a polling to the remote server.
I wonder if there is another way to achieve this, avoiding polling.