Showing posts with label heuristic exception. Show all posts
Showing posts with label heuristic exception. Show all posts

Friday, February 21

Heuristic exceptions






Heuristic exceptions are inconsistent exceptions . These exceptions does not come all the time and May occur suddenly due to some unavoidable condition 







For example You are calling a service to do some transaction on database and data-source configuration is missing . This happened because last time server got restarted Data-source configuration is removed . So this can be restored by setting the configuration right. 

For example in distributed system multiple parties taking part in a two phase commit transaction are waiting for transaction manager to get information If all of them should commit their individual transaction or not. Transaction manager took lot of time to response and Participant committed their individual transaction even before that . There could come a situation where some participants commit their transaction while others don't and they rollback it if transaction manager sends information to rollback. Thus in distributed system data becomes highly inconsistent .
You put some message in JMS queue But all of a sudden Queue connection breaks and you fail you get any proper response .

Such kind of strange and inconsistent exception falls under heuristic exceptions.


-->