Пример #1
0
 public void commitChanges(VariableInstance var, ScopeFrame scopeFrame, Node value)
     throws ExternalVariableModuleException {
   if (var.declaration.extVar != null) /* external variable */ {
     if (__log.isDebugEnabled())
       __log.debug(
           "Write external variable: name="
               + var.declaration
               + " value="
               + DOMUtils.domToString(value));
     VariableInstance related = scopeFrame.resolve(var.declaration.extVar.related);
     Node reference = null;
     try {
       reference = fetchVariableData(var, scopeFrame, true);
     } catch (FaultException fe) {
       // In this context this is not necessarily a problem, since the assignment may re-init the
       // related var
     }
     VariableContext.ValueReferencePair vrp = _brc.writeExtVar(var, reference, value);
     commitChanges(related, scopeFrame, vrp.reference);
   } else /* normal variable */ {
     if (__log.isDebugEnabled())
       __log.debug(
           "Write variable: name=" + var.declaration + " value=" + DOMUtils.domToString(value));
     _brc.commitChanges(var, value);
   }
   writeProperties(var, value);
 }