views:

181

answers:

1

On a Server there can occur different temporary (transient) errors. For example an OutOfMemoryError or a broken connection to a database.

I think it is a good idea to repeat such job a short time later. Of course it should not a endless loop because the error is not temporary.

Are there any good API to help with it? Or a guide how I can implement it self. It sould have parameter like:

  • repeat count
  • max execution time
  • needed free memory
  • etc
+2  A: 

This general idea is often called the Circuit Breaker pattern. Google has an interesting list of implementation ideas.

Hank Gay