Transactions
Ideally, the metaxml program would perform all actions in an XML file as one transaction. With one transaction per XML file, either the entire content of the XML file would be applied to the MDS repository or every action will be rolled back. Depending on the content and size of the XML file, using one transaction can cause the following problems:
By default, the metaxml program uses MDS implicit transactions, which commits changes after each call to a MDS API. In the MDS DTD, the following element tags have a transaction attribute: METAUSERS, METAGROUPS, SECURITYPROFILES, MODELDESC, CLASSDESC, RELATIONSHIPDESC, PROPERTYDESC, DERIVEDCLASSDESC, RELATION and OBJECT. If the element tag has a transaction attribute value to “yes”, then metaxml will begin a MDS explicit transaction and end the transaction when the element ends. For example:
<MODEL>
<NAME>Model 1</NAME>
<CLASS>Class 1
<NAME>Class 1</NAME>
<OBJECT transaction=”yes”> fl Start a transaction (Tx1)
...
<RELATIONSHIP>
<OBJECT> fl Under transaction (Tx1)
<RELATIONSHIP>
<OBJECT transaction=”yes”> fl Start a transaction (Tx2). However,
nested transaction is not allowed.
Under transaction Tx1.
</OBJECT>
</RELATIONSHIP>
</OBJECT>
</RELATIONSHIP>
</OBJECT> fl End transaction (Tx1)
<OBJECT> fl by default, implicit transaction
</OBJECT>
</CLASS>