Hi,
I currently have a javacallout policy in which I submit tasks (of type Runnable) to the ExecutionContext via the submitTask() method and I would like to be able to set a timeout on that task in case it takes way too long or there is a bug within the task code and the task never finishes. Is there an existing way to do it inside Apigee?
Thanks.
Just catching up.
This sounds like the wrong thing to try to do.
Can you explain your real goal? There's probably a better way.
The JavaScript callout is not designed to support launching of asynchronous tasks that run indefinitely.
Hi Dino-at-Google, we are using a java callout, not a javascript callout. Does that change your answer?
Sorry! I had misread the question!
I think you would need to implement a timeout on your Runnable. There is no timeout on the submitTask().
For example:
http://www.tothenew.com/blog/runnables-with-timeout-from-submission-time/
I will be interested to hear how you progress. Will you post your findings and results here?