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();