Merge pull request #1 from martin-g/master

Export both the application and the session when available for the task.
Shutdown the execution service on application stop