String name = objectName.getCanonicalName();
KernelRegistryEntry entry = kernel.getRegistry().getEntry(name);
if (entry != null)
{
Object target = entry.getTarget();
if (target instanceof RARDeployment)
{
RARDeployment deployment = (RARDeployment) target;
return deployment.invoke(operationName, params, signature);
}
else
{
Class[] types = new Class[signature.length];
for (int i = 0; i < signature.length; ++i)
{
types[i] = Thread.currentThread().getContextClassLoader().loadClass(signature[i]);
}
Method method = target.getClass().getMethod(operationName, types);
return method.invoke(target, params);
}
}
return null;