Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Code Block
languagecpp
themeConfluence
EdmiError edmiActivateModel (SdaiServerContext serverContextId); 

Reserves exclusive write privileges to a model.

...

Any number of clients may open a model for write access at the same time. This is possible because all

...

persistent changes within model must be done within a model write transaction. Conflicts are avoided by only allowing one open model write transaction within a model at any point of time. If a client attempts to start a model write transaction while an other client has already reserved exclusive write privileges for him self by starting a model write transaction, the first client will have to wait until the ongoing transaction is either committed or aborted.

...

In order to start a model write transaction, the model must be opened for write.

...

Ordinary transactions may be nested within a model write transaction with edmiStartTransaction. However, model write transactions may not be nested within ordinary transactions.

...

Closing a model write transaction is done by one of the following EDMInterface operations; edmiCommitTransaction, edmiAbortTransaction, edmiCommitAllTransactions, edmiAbortAllTransactions

...

ModelId

Arguments

...

TypeNameComment
SdaiModelmodelIDA numeric modelID that uniquely identifies the data model of interest in the EDMdatabase

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

Options

...

 

Example

...

 

Code Block
languagecpp
EdmiError rstat;
 SdaiModel modId;
 . . .
 modeId = edmiGetModelBN("ourRepository", "ourModel");

...


  
 /* Start outer model write X-action */

...


 if (edmiStartModelWriteTransaction(modId)) {

...


 printf("\nError %d in edmiStartModelWriteTransaction: %s, rstat,

...

 
 edmiGetErrorText(rstat));

...

 
 goto error;

...

 
 }
 /* Nested X-actions */

...


 edmiStartTransaction();

...


 . . .

...


 if (rstat) {

...


 edmiAbortTransaction();

...


 } else {

...


 edmiCommitTransaction();

...


 }

...


 /* Commit outer model write X-action */

...


 edmiCommitTransaction();

...


 . . .

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"