The repository engine supports the bracketing of multiple changes within the scope of a transaction. Changes to a repository that are bracketed within a transaction are either all committed or all undone, depending on the way that the transaction is completed. Repository methods that are reading data from the repository may be executed outside of a transaction, but methods that write data must be bracketed within a transaction.
You cannot directly instantiate a RepositoryTransaction object. When you connect to a repository, a RepositoryTransaction object is created for you. It is accessible through the Repository Transaction property.
When to Use
Use the RepositoryTransaction object to manage repository transactions.
|Status||The transaction status of the repository|
|Abort||Cancels the current transaction|
|Begin||Begins a new transaction|
|Commit||Commits the current transaction|
|Flush||Flushes uncommitted changes to the repository database|
|GetOption||Retrieves various transaction options|
|SetOption||Sets various transaction options|
Only one transaction can be active at a time for each opened Repository instance. Nesting of Begin or Commit method invocations is permitted, but no actual nesting of transactions occurs.