Simulating java transactions on external resources that are not aware of transactions by compensation