try {
return mbeanServer.getAttribute(Kernel.KERNEL, attributeName);
} catch (Exception e) {
Throwable cause = unwrapJMException(e);
if (cause instanceof InstanceNotFoundException) {
throw new InternalKernelException("Kernel is not loaded");
} else if (cause instanceof AttributeNotFoundException) {
throw new InternalKernelException("KernelDelegate is out of synch with Kernel");
} else {
throw new InternalKernelException(cause);
}
}
}