<!ELEMENT transaction (<add-item> | <update-item> | <print-item> | <remove-item> |
                       <transaction> | <query-items> | <remove-all-items> |
                       <export-items> | <load-items> | <rollback-transaction>)*>

Parent: <gsa-template>, <transaction>

You can use a <transaction> tag to group a set of test operation tags. A <transaction> tag takes no attributes. If a <transaction> tag appears inside of another transaction, the outer transaction is suspended while the inner transaction executes, and resumes when it ends.

<add-item> tags in this element are processed one at a time. They cannot make forward references to other items and no attempt is made to satisfy database integrity constraints (beyond that automatically done with the cascade operator). Use the <import-items> tag to load items with forward references.

By default, all test operation tags are enclosed in a single transaction . But to avoid database deadlocks, you should place all test operation tags inside <transaction> tags . For example, given this pattern:

<add-item item-descriptor="foo" id="1"/>

<transaction>
  <print-item item-descriptor="foo" id="1"/>
</transaction>

the <print-item> tag cannot find item 1 because that item is not yet committed. Also, you can run into deadlocks with this pattern if you try to access or modify items that may be locked by operations in the outer tag. Instead, use a pattern like this:

<transaction>
  <add-item item-descriptor="foo" id="1"/>
</transaction>
<transaction>
  <print-item item-descriptor="foo" id="1"/>
</transaction>

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices