@Override public Object execute() throws Exception { System.out.println("execute now : " + ProxyTarget.targetClass().getCanonicalName()); return ProxyTarget.invoke(); } }
@Override public Object execute() throws Exception { System.out.println("execute now : " + ProxyTarget.targetClass().getCanonicalName()); return ProxyTarget.invoke(); } }
public String aaa(int Welcome, String To, Object Jodd) { String methodName = ProxyTarget.targetMethodName(); Class[] argTypes = ProxyTarget.createArgumentsClassArray(); Class targetClass = ProxyTarget.targetClass(); Method m = null; try { m = targetClass.getDeclaredMethod(methodName, argTypes); } catch (NoSuchMethodException e) { e.printStackTrace(); } MethodParameter[] methodParameters = Paramo.resolveParameters(m); Class c = ProxyTarget.argumentType(1); Object val = ProxyTarget.argument(1); return c.getName() + val.toString() + methodParameters[0].getName() + methodParameters[1].getName() + methodParameters[2].getName(); }
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; } } }