8.6.2. Transactions Example
The following code demonstrates transactional sessions:
- .NET/C#
Connection connection = new Connection(broker); Session session = connection.createTransactionalSession(); ... if (smellsOk()) session.Commit(); else session.Rollback();
- C++
Connection connection(broker); Session session = connection.createTransactionalSession(); ... if (smellsOk()) session.commit(); else session.rollback();