public InvocationResponse dynamicInvoke(Invocation invocation) throws Throwable
{
long start = System.currentTimeMillis();
ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
StatefulContainerInvocation newSi = null;
MethodInvocation si = (MethodInvocation) invocation;
MethodInfo info = getAdvisor().getMethodInfo(si.getMethodHash());
Method method = info.getUnadvisedMethod();
try
{
invokeStats.callIn();
Thread.currentThread().setContextClassLoader(classloader);
if (info == null)
{
throw new RuntimeException("Could not resolve beanClass method from proxy call");
}
newSi = new StatefulContainerInvocation(info, null);
newSi.setArguments(si.getArguments());
newSi.setMetaData(si.getMetaData());
newSi.setAdvisor(getAdvisor());
newSi = populateInvocation(newSi);
Object rtn = null;
try
{
rtn = newSi.invokeNext();
}
catch (Throwable throwable)
{
return marshallException(invocation, throwable, newSi.getResponseContextInfo());
}
InvocationResponse response = SessionContainer.marshallResponse(invocation, rtn, newSi
.getResponseContextInfo());
return response;
}
finally