public Method getActualMethod() { return wrapped.getActualMethod(); }
public void throwMandatory(Invocation invocation) { throw new EJBTransactionRequiredException(((MethodInvocation) invocation).getActualMethod().toString()); }
public Object invoke(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation) invocation; Method m = mi.getActualMethod(); Object[] args = mi.getArguments(); Object value = null; try { m.invoke(target, args); } catch(InvocationTargetException ite) { throw ite.getCause(); } return value; }
protected static TransactionAttributeType getTxType(MethodInvocation invocation) { return getTxType(invocation.getAdvisor(), invocation.getActualMethod()); }
private static TransactionAttributeType getTxType(Invocation invocation) { // Use the method tx attribute if we're invoking a business method, else the bean attribute Method method = null; if(invocation instanceof MethodInvocation) method = ((MethodInvocation) invocation).getActualMethod(); return getTxType(invocation.getAdvisor(), method); }
private void logMethod(boolean beforeAfter, Invocation invocation, Object result, Throwable t) { MethodInvocation mi = (MethodInvocation) invocation; StringBuilder builder = new StringBuilder(); Object target = mi.getTargetObject(); builder.append(target.getClass().getSimpleName()); builder.append('@'); builder.append(System.identityHashCode(target)); if (beforeAfter == false) builder.append(" before "); else builder.append(" after "); builder.append(mi.getActualMethod().getName()); if (beforeAfter == false) { builder.append(" params="); builder.append(Arrays.asList(mi.getArguments())); } else if (t == null) { builder.append(" result="); builder.append(result); } if (t != null) builder.append(" ended in error:"); log.trace(builder.toString(), t); } }
protected static int getTransactionTimeout(MethodInvocation invocation) { return getTransactionTimeout(invocation.getAdvisor(), invocation.getActualMethod()); }
final Method actualMethod = si.getActualMethod();
protected Set<Principal> getRoleSet(Invocation invocation) Method method = ((MethodInvocation)invocation).getActualMethod();
/** * Invokes the target joinpoint for this invocation skipping any subsequent * interceptors in the chain. */ public Object invokeTarget() throws Throwable { try { return getActualMethod().invoke(getTargetObject(), arguments); } catch (Throwable t) { throw handleErrors(getTargetObject(), getMethod(), arguments, t); } }