public long getMethodHash() { return wrapped.getMethodHash(); }
public long getMethodHash() { return delegate.getMethodHash(); }
public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { // For non-advised methods, we can only do public method invocations org.jboss.aop.joinpoint.MethodInvocation methodInvocation = (org.jboss.aop.joinpoint.MethodInvocation)invocation; long methodHash = methodInvocation.getMethodHash(); HashMap methodMap = ClassProxyFactory.getMethodMap(obj.getClass()); MethodPersistentReference ref = (MethodPersistentReference)methodMap.get(new Long(methodHash)); Method method = (Method)ref.get(); Object[] args = methodInvocation.getArguments(); try { return method.invoke(obj, args); } catch (InvocationTargetException ex) { throw ex.getTargetException(); } } else { throw new RuntimeException("field invocations not implemented"); } } }
long methodHash = methodInvocation.getMethodHash(); HashMap methodMap = ClassProxyFactory.getMethodMap(target.getClass()); MethodPersistentReference ref = (MethodPersistentReference)methodMap.get(new Long(methodHash));
public <T extends Annotation> T resolveTypedAnnotation(Class<T> annotation) { T val = super.resolveTypedAnnotation(annotation); if (val != null) return val; if (getAdvisor() != null) { val = getAdvisor().resolveTypedAnnotation(getMethodHash(), getMethod(), annotation); if (val != null) return val; } return null; }
/** * */ public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { org.jboss.aop.joinpoint.MethodInvocation methodInvocation = (org.jboss.aop.joinpoint.MethodInvocation)invocation; long methodHash = methodInvocation.getMethodHash(); Method managerMethod = manager.isManagerMethod(methodHash); if (managerMethod != null) { Object[] args = methodInvocation.getArguments(); return managerMethod.invoke(manager, args); } Object target = methodInvocation.getTargetObject(); Method method = methodInvocation.getMethod(); if (method == null) { HashMap methodMap = manager.getMethodMap(); MethodPersistentReference ref = (MethodPersistentReference)methodMap.get(new Long(methodHash)); method = (Method)ref.get(); } return method.invoke(target, methodInvocation.getArguments()); } return invocation.invokeNext(); }
long methodHash = methodInvocation.getMethodHash(); if (logger.isTraceEnabled())
long methodHash = methodInvocation.getMethodHash(); HashMap<Long, MethodPersistentReference> methodMap = ClassProxyFactory.getMethodMap(target.getClass()); MethodPersistentReference ref = methodMap.get(new Long(methodHash));
public InvocationResponse dynamicInvoke(Invocation invocation) throws Throwable { ClassLoader oldLoader = Thread.currentThread().getContextClassLoader(); EJBContainerInvocation newSi = null; pushEnc(); try { Thread.currentThread().setContextClassLoader(classloader); MethodInvocation si = (MethodInvocation) invocation; MethodInfo info = getAdvisor().getMethodInfo(si.getMethodHash()); if (info == null) { throw new RuntimeException("Could not resolve beanClass method from proxy call"); } newSi = new MessageContainerInvocation(info); newSi.setArguments(si.getArguments()); newSi.setMetaData(si.getMetaData()); newSi.setAdvisor(getAdvisor()); InvocationResponse response = new InvocationResponse(newSi.invokeNext()); response.setContextInfo(newSi.getResponseContextInfo()); return response; } finally { Thread.currentThread().setContextClassLoader(oldLoader); popEnc(); } }
methodInvocation.getMethodHash(), methodInvocation.getArguments());
MethodInfo info = getAdvisor().getMethodInfo(si.getMethodHash()); Method method = info.getUnadvisedMethod(); try
long methodHash = si.getMethodHash(); log.debug("Received dynamic invocation for method with hash: " + methodHash);
long hash = methodInvocation.getMethodHash(); MethodInfo info = methodInfos.getMethodInfo(hash);