_collection = collection;
}
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable {
FederatedServiceMethodInvocationHandler methodHandler = _methodHandlers.get(method);
if (method.getDeclaringClass() == Object.class)
return method.invoke(this, args);
try {
return methodHandler.invoke(_collection, method, args);
} catch (Throwable ex) {
if (ex instanceof InvocationTargetException) {
InvocationTargetException ite = (InvocationTargetException) ex;
ex = ite.getTargetException();
}