public override void BeginProcessCommands(Transaction tx, AsyncCallback callback, object asyncState) { WaitForAll waitForAllCallback = new WaitForAll(callback, asyncState); base.BeginProcessCommands(tx, waitForAllCallback.Callback("engine"), asyncState); Transaction t; SyncCommandProcessor syncCommandProcessor; GenerateTransactionId(metadataEngine); t = new Transaction(metadataEngine.Factory.Model); syncCommandProcessor = new SyncCommandProcessor(this, t, lastTransactionId); foreach (Command c in tx.PendingCommands) { // Ignores commands in metadata if (c.IgnoreMetadata || ignoreClientMetadata) continue; syncCommandProcessor.Visit(c); } t.BeginCommit(waitForAllCallback.Callback("metadata"), metadataEngine, false, t); if (secondaryMetadataEngine != null) { GenerateTransactionId(secondaryMetadataEngine); t = new Transaction(secondaryMetadataEngine.Factory.Model); syncCommandProcessor = new SyncCommandProcessor(this, t, lastTransactionId); foreach (Command c in tx.PendingCommands) { syncCommandProcessor.Visit(c); } t.BeginCommit(waitForAllCallback.Callback("metadata2"), secondaryMetadataEngine, false, t); } }
public override void ProcessCommands(Transaction tx) { base.ProcessCommands(tx); Transaction t; SyncCommandProcessor syncCommandProcessor; GenerateTransactionId(metadataEngine); t = new Transaction(metadataEngine.Factory.Model); syncCommandProcessor = new SyncCommandProcessor(this, t, lastTransactionId); foreach (Command c in tx.PendingCommands) { // Ignores commands in metadata if (c.IgnoreMetadata || ignoreClientMetadata) continue; syncCommandProcessor.Visit(c); } t.Commit(metadataEngine, false); if (secondaryMetadataEngine != null) { GenerateTransactionId(secondaryMetadataEngine); t = new Transaction(secondaryMetadataEngine.Factory.Model); syncCommandProcessor = new SyncCommandProcessor(this, t, lastTransactionId); foreach (Command c in tx.PendingCommands) { syncCommandProcessor.Visit(c); } t.Commit(secondaryMetadataEngine, false); } }