JsonRePresentation rep = new JsonRePresentation(ef).reset(input);
if(rep.lexer.yylex() != Yytoken.TYPE_LEFT_SQUARE) throw new ParseException("request args should be passed as array");
for(int i=0;;i++) {
AjaxRequestResult result = new AjaxRequestResult();
try {
String beanName = getStringFromJsonArray("Bean name expected", rep);
if(beanName==null) break;
String methodName = getStringFromJsonArray("Method name expected", rep);
if(methodName==null) break;
rep.lexer.yylex();
if(rep.lexer.type != Yytoken.TYPE_COMMA) {
throw new ParseException("Method " + methodName + " args expected as array");
}
if(!doAction(beanName, methodName, rep, request, result)) break;
if(orm != null) orm.commit();
}catch(Throwable e) {
if(e.getClass().getCanonicalName().equals("org.eclipse.jetty.continuation.ContinuationThrowable")) {
throw e;
}
e.printStackTrace();
if(null!=orm) orm.rollback();
result.setError(e);
if(e instanceof ParseException) {
results.add(result);
break;
}
}