public beginTransaction() as EntityTransaction:
Begins the transaction bound to this manager's provider session.
A manager owns one transaction coordinator. Calling this method while that transaction is active raises an exception rather than creating a second transaction over the same provider session.
Active transaction used to commit or roll back provider work.
transaction = manager.beginTransaction() try: manager.persist(user) transaction.commit() catch error as Exception: if transaction.active: transaction.rollback() throw error