2.12.4 排他およびデッドロックについて
排他およびデッドロックについて,次に示すことに注意してください。
-
同じトランザクション内で複数の更新系のメソッドを使用すると,デッドロックが発生するおそれがあります。同じトランザクション内で複数の更新系のメソッドを使用しないでください。ただし,1つの更新系のメソッドと更新系以外のメソッドは,同一トランザクション内でも使用できます。
-
トランザクションの開始から終了までの間隔は,できるだけ短くしてください。また,更新系のメソッドを呼び出した場合は,できるだけ早くコミットまたはロールバックしてください。複数のプログラムで実行しているときなどに,排他待ちが発生して処理速度が低下することがあります。