This sample demonstrates a two-phase commit to two conventional memory databases. The application opens two databases, then initializes both with specific key values. It attempts to insert records with sequential key values but fails when duplicate key values occur, causing the phase-1 commit to fail and the transaction to be rolled back.
See instructions here on how to build this and other samples on your development platform. Once built, the sample can be run from the
\target\bindirectory:07_transactions_ph2commitHowever, it is more instructive to run it in your development environment debugger, stepping through the code.