public Object execute() { Class type = targetClass(); String methodName = targetMethodName(); Class[] methodArgsTypes = createArgumentsClassArray(); String methodDescription = targetMethodDescription(); // read transaction mode from annotation JtxTransactionMode txMode = manager.getTxMode(type, methodName, methodArgsTypes, methodDescription); // request transaction JtxTransaction tx = null; try { String scope = manager.resolveScope(type, methodName); tx = manager.getJtxWorker().maybeRequestTransaction(txMode, scope); Object result = invoke(); manager.getJtxWorker().maybeCommitTransaction(tx); return result; } catch (Exception ex) { manager.getJtxWorker().markOrRollbackTransaction(tx, ex); throw ex; } } }
public Object execute() throws Exception { Class type = targetClass(); String methodName = targetMethodName(); Class[] methodArgsTypes = createArgumentsClassArray(); String methodDescription = targetMethodDescription(); // read transaction mode from annotation JtxTransactionMode txMode = manager.getTxMode(type, methodName, methodArgsTypes, methodDescription); // request transaction JtxTransaction tx = null; try { String scope = manager.resolveScope(type, methodName); tx = manager.getJtxWorker().maybeRequestTransaction(txMode, scope); Object result = invoke(); manager.getJtxWorker().maybeCommitTransaction(tx); return result; } catch (Exception ex) { manager.getJtxWorker().markOrRollbackTransaction(tx, ex); throw ex; } } }
public Object execute() { Class type = targetClass(); String methodName = targetMethodName(); Class[] methodArgsTypes = createArgumentsClassArray(); String methodDescription = targetMethodDescription(); // read transaction mode from annotation JtxTransactionMode txMode = manager.getTxMode(type, methodName, methodArgsTypes, methodDescription); // request transaction JtxTransaction tx = null; try { String scope = manager.resolveScope(type, methodName); tx = manager.getJtxWorker().maybeRequestTransaction(txMode, scope); Object result = invoke(); manager.getJtxWorker().maybeCommitTransaction(tx); return result; } catch (Exception ex) { manager.getJtxWorker().markOrRollbackTransaction(tx, ex); throw ex; } } }