public TransactionRollback(Element element, SimpleMethod simpleMethod) throws MiniLangException {
   super(element, simpleMethod);
   if (MiniLangValidate.validationOn()) {
     MiniLangValidate.attributeNames(simpleMethod, element, "began-transaction-name");
     MiniLangValidate.expressionAttributes(simpleMethod, element, "began-transaction-name");
     MiniLangValidate.noChildElements(simpleMethod, element);
   }
   beganTransactionFma =
       FlexibleMapAccessor.getInstance(
           MiniLangValidate.checkAttribute(
               element.getAttribute("began-transaction-name"), "beganTransaction"));
 }
示例#2
0
 public EntityData(Element element, SimpleMethod simpleMethod) throws MiniLangException {
   super(element, simpleMethod);
   if (MiniLangValidate.validationOn()) {
     MiniLangValidate.attributeNames(
         simpleMethod,
         element,
         "location",
         "timeout",
         "delegator-name",
         "error-list-name",
         "mode");
     MiniLangValidate.requiredAttributes(simpleMethod, element, "location");
     MiniLangValidate.expressionAttributes(simpleMethod, element, "delegator-name");
     MiniLangValidate.constantAttributes(simpleMethod, element, "timeout", "mode");
     MiniLangValidate.noChildElements(simpleMethod, element);
   }
   locationFse = FlexibleStringExpander.getInstance(element.getAttribute("location"));
   mode = MiniLangValidate.checkAttribute(element.getAttribute("mode"), "load");
   String timeoutAttribute = element.getAttribute("timeout");
   if (!"load".equals(mode) && !timeoutAttribute.isEmpty()) {
     MiniLangValidate.handleError(
         "timeout attribute is valid only when mode=\"load\".", simpleMethod, element);
   }
   int timeout = -1;
   if (!timeoutAttribute.isEmpty()) {
     try {
       timeout = Integer.parseInt(timeoutAttribute);
     } catch (NumberFormatException e) {
       MiniLangValidate.handleError(
           "Exception thrown while parsing timeout attribute: " + e.getMessage(),
           simpleMethod,
           element);
     }
   }
   this.timeout = timeout;
   errorListFma =
       FlexibleMapAccessor.getInstance(
           MiniLangValidate.checkAttribute(element.getAttribute("error-list-name"), "error_list"));
 }