Which is better, SQL transaction or Java side transaction for an banking application?
问题 I am making a banking application and not able to decide which will be a better approach to handle fund transfer transactions. Using SQL may need rewritting code if the database changes. Using pure Java to handle will make it little more complex in terms of locking the accounts for the transactions. What is the best practice for this scenario? PS - please consider a distributed application server in this case. 回答1: Any application, that leaves the DB in a possibly inconcistent state on hard